问:
Error making a squirrel distributable for win32/x64 - Electron-Forge App
I installed Wine in Ubuntu 22.04 and I executed yarn make --platform=win32 in order to produce the .exe executable Electron file, I get some strange errors:

```<code>raphy@raohy:~/ForgeTypescriptReactWebpack$ yarn make --platform=win32
yarn run v1.22.19
$ electron-forge make --platform=win32
✔ Checking your system
✔ Loading configuration
✔ Resolving make targets
  › Making for the following targets: squirrel, zip
✔ Running package command
  ✔ Preparing to package application
  ✔ Running packaging hooks
    ✔ Running generateAssets hook
    ✔ Running prePackage hook
      ✔ [plugin-webpack] Preparing native dependencies: 1 / 1
      ✔ [plugin-webpack] Building webpack bundles
  ✔ Packaging application
    ✔ Packaging for x64 on win32 [27s]
  ✔ Running postPackage hook
✔ Running preMake hook
❯ Making distributables
  ✖ Making a squirrel distributable for win32/x64
    › spawn mono ENOENT
  ◼ Making a zip distributable for win32/x64
◼ Running postMake hook

An unhandled rejection has occurred inside Forge:
Error: spawn mono ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
raphy@raohy:~/ForgeTypescriptReactWebpack$
</code>```

In package.json:

```<code>"scripts": {
    "make": "electron-forge make",
}
</code>```

Executing via Wine the produced .exe file I get this:

raphy@raohy:~$ wine /home/raphy/ForgeTypescriptReactWebpack/out/forgetypescriptreactwebpack-win32-x64/forgetypescriptreactwebpack.exe
0100:err:winediag:ntlm_check_version ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.
0100:err:ntlm:ntlm_LsaApInitializePackage no NTLM support, expect problems
0100:fixme:powrprof:PowerRegisterSuspendResumeNotification (0x00000002,000000000081FCF0,000000000081FCE8) stub!
0104:fixme:process:NtQueryInformationProcess (0xffffffffffffffff,info_class=49,0x19efc38,0x00000008,(nil)) Unknown information class
0100:fixme:heap:RtlSetHeapInformation 0000000000000000 1 0000000000000000 0 stub

```<code>0100:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 000005180029CDB0, 16) stub
0100:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 000000000081F56C, 0000000000000000 000000000081F568
0100:fixme:nls:get_dummy_preferred_ui_language (0x38 000000000081F56C 0000000000000000 000000000081F568) returning a dummy value (current locale)
0100:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 000000000081F56C, 000000000081F552 000000000081F568
0100:fixme:nls:get_dummy_preferred_ui_language (0x38 000000000081F56C 000000000081F552 000000000081F568) returning a dummy value (current locale)
0100:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
0128:fixme:kernelbase:AppPolicyGetThreadInitializationType FFFFFFFFFFFFFFFA, 0000000006DEFE10
0100:fixme:imm:ImeSetActiveContext (0x880360, 1): stub
0100:fixme:imm:ImmReleaseContext (0000000000010062, 0000000000880360): stub
0070:fixme:imm:ImeSetActiveContext (0x25e1b0, 0): stub
0070:fixme:imm:ImmReleaseContext (0000000000010020, 000000000025E1B0): stub
0100:fixme:winsock:WSALookupServiceBeginW (000000000081F000 0x00000ff0 000000000081F078) Stub!
[252:0105/192543.562:ERROR:network_change_notifier_win.cc(225)] WSALookupServiceBegin failed with: 0
0100:fixme:iphlpapi:NotifyAddrChange (Handle 000000000081F1D8, overlapped 0000051800320090): stub
0100:fixme:win:GetPointerDevices (000000000081EB3C 0000000000000000): partial stub
0100:fixme:system:QueryDisplayConfig (00000002 000000000081EB50 0000051800278A70 000000000081EB40 0000051800688300 0000000000000000): semi-stub
0100:fixme:system:DisplayConfigGetDeviceInfo Unimplemented packet type: 11
0140:fixme:wtsapi:WTSRegisterSessionNotification Stub 0000000000020052 0x00000000
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000000000000000 len=0 000000000CCFEF9C),stub!
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 00000518007583D0 len=40 000000000CCFEF9C),stub!
0154:fixme:ntdll:NtSetInformationToken TokenIntegrityLevel stub!
0154:fixme:ntdll:NtFilterToken flags 0x1 unsupported
0154:fixme:ntdll:NtFilterToken support for restricting sids not yet implemented
0100:fixme:service:I_ScRegisterDeviceNotification Notification filters are not yet implemented.
0100:fixme:system:EnableNonClientDpiScaling (0000000000020058): stub
0100:fixme:win:RegisterTouchWindow (0000000000020058 00000002): stub
0140:fixme:wtsapi:WTSRegisterSessionNotification Stub 0000000000020056 0x00000000
0100:fixme:dwmapi:DwmSetWindowAttribute (0000000000020058, 2, 000000000081D684, 4) stub
0114:fixme:file:NtLockFile I/O completion on lock not implemented yet
0150:fixme:file:ReplaceFileW Ignoring flags 2
011c:fixme:file:ReplaceFileW Ignoring flags 2
0100:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 000000000081CA6C, 0000000000000000 000000000081CA68
0100:fixme:nls:get_dummy_preferred_ui_language (0x38 000000000081CA6C 0000000000000000 000000000081CA68) returning a dummy value (current locale)
0100:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 000000000081CA6C, 000000000081CA52 000000000081CA68
0100:fixme:nls:get_dummy_preferred_ui_language (0x38 000000000081CA6C 000000000081CA52 000000000081CA68) returning a dummy value (current locale)
0100:fixme:dwrite:dwritefontface5_HasVariations 0000000000ED0A60: stub
0100:fixme:win:RegisterPowerSettingNotification (0000000000020056,{2b84c20e-ad23-4ddf-93db-05ffbd7efca5},0): stub
0184:fixme:dwmapi:DwmGetWindowAttribute (0000000000020058 14 0000000010E7F5AC 4) stub
0100:fixme:win:GetPointerDevices (000000000081C80C 0000000000000000): partial stub
0100:fixme:system:QueryDisplayConfig (00000002 000000000081C820 0000051800ADB570 000000000081C810 0000051800AEF380 0000000000000000): semi-stub
0114:fixme:file:ReplaceFileW Ignoring flags 2
0100:fixme:system:DisplayConfigGetDeviceInfo Unimplemented packet type: 11
0100:fixme:msctf:SetInputScopes STUB: 0000000000020058 ... (null) (null)
MAIN_WINDOW_WEBPACK_ENTRY:  file://Z:\home\raphy\ForgeTypescriptReactWebpack\out\forgetypescriptreactwebpack-win32-x64\resources\app\.webpack\renderer\
main_window\index.html
0100:fixme:shcore:GetCurrentProcessExplicitAppUserModelID 000000000081CC60: stub
0100:fixme:win:RegisterTouchWindow (0000000000010080 00000002): stub
[252:0105/192544.046:ERROR:gpu_process_host.cc(968)] GPU process launch failed: error_code=49
0184:fixme:dwmapi:DwmGetWindowAttribute (0000000000020058 14 0000000010E7F2CC 4) stub
0180:err:winediag:ntlm_check_version ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.
0180:err:ntlm:ntlm_LsaApInitializePackage no NTLM support, expect problems
0180:fixme:powrprof:PowerRegisterSuspendResumeNotification (0x00000002,000000000081FCF0,000000000081FCE8) stub!
019c:fixme:process:NtQueryInformationProcess (0xffffffffffffffff,info_class=49,0x19efc38,0x00000008,(nil)) Unknown information class
0180:fixme:heap:RtlSetHeapInformation 0000000000000000 1 0000000000000000 0 stub
0180:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 000004CE002ACCF0, 16) stub
01b4:fixme:winsock:WSALookupServiceBeginW (0000000005ADDC10 0x00000ff0 0000000005ADDC88) Stub!
[380:0105/192544.150:ERROR:network_change_notifier_win.cc(225)] WSALookupServiceBegin failed with: 0
01b4:fixme:iphlpapi:NotifyAddrChange (Handle 0000000005ADDDE8, overlapped 000004CE0031CB10): stub
01b4:fixme:wlanapi:WlanEnumInterfaces (0000000000000001, 0000000000000000, 0000000005ADCE68) semi-stub
01b4:fixme:wlanapi:WlanEnumInterfaces (0000000000000001, 0000000000000000, 0000000005ADCE68) semi-stub
01b4:fixme:winsock:setsockopt Ignoring SO_RANDOMIZE_PORT
0100:fixme:msctf:SetInputScopes STUB: 0000000000020058 ... (null) (null)
0100:fixme:msctf:SetInputScopes STUB: 0000000000020058 ... (null) (null)
0198:err:winediag:ntlm_check_version ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.
0198:err:ntlm:ntlm_LsaApInitializePackage no NTLM support, expect problems
0198:fixme:powrprof:PowerRegisterSuspendResumeNotification (0x00000002,000000000081FCF0,000000000081FCE8) stub!
01d4:fixme:process:NtQueryInformationProcess (0xffffffffffffffff,info_class=49,0x19efc38,0x00000008,(nil)) Unknown information class
0198:fixme:heap:RtlSetHeapInformation 0000000000000000 1 0000000000000000 0 stub
0198:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 000000CA002A0F30, 16) stub
0198:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
0198:fixme:thread:QueryThreadCycleTime (FFFFFFFFFFFFFFFE,000000000081EAE8): stub!
0218:fixme:kernelbase:AppPolicyGetThreadInitializationType FFFFFFFFFFFFFFFA, 000000000B63FE10
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000000000000000 len=0 000000000CCFEF9C),stub!
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000051800758340 len=40 000000000CCFEF9C),stub!
0154:fixme:ntdll:NtSetInformationToken TokenIntegrityLevel stub!
0154:fixme:ntdll:NtFilterToken flags 0x1 unsupported
0154:fixme:ntdll:NtFilterToken support for restricting sids not yet implemented
[252:0105/192544.356:ERROR:gpu_process_host.cc(968)] GPU process launch failed: error_code=49
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000000000000000 len=0 000000000CCFEF9C),stub!
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000051800BAF620 len=40 000000000CCFEF9C),stub!
0154:fixme:ntdll:NtSetInformationToken TokenIntegrityLevel stub!
0154:fixme:ntdll:NtFilterToken flags 0x1 unsupported
0154:fixme:ntdll:NtFilterToken support for restricting sids not yet implemented
[252:0105/192544.545:ERROR:gpu_process_host.cc(968)] GPU process launch failed: error_code=49
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000000000000000 len=0 000000000CCFEF9C),stub!
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000051800CA6BE0 len=40 000000000CCFEF9C),stub!
0154:fixme:ntdll:NtSetInformationToken TokenIntegrityLevel stub!
0154:fixme:ntdll:NtFilterToken flags 0x1 unsupported
0154:fixme:ntdll:NtFilterToken support for restricting sids not yet implemented
[252:0105/192544.729:ERROR:gpu_process_host.cc(968)] GPU process launch failed: error_code=49
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000000000000000 len=0 000000000CCFEF9C),stub!
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000051800BAFC20 len=40 000000000CCFEF9C),stub!
0154:fixme:ntdll:NtSetInformationToken TokenIntegrityLevel stub!
0154:fixme:ntdll:NtFilterToken flags 0x1 unsupported
0154:fixme:ntdll:NtFilterToken support for restricting sids not yet implemented
[252:0105/192544.911:ERROR:gpu_process_host.cc(968)] GPU process launch failed: error_code=49
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000000000000000 len=0 000000000CCFEF9C),stub!
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000051800CA64F0 len=40 000000000CCFEF9C),stub!
0154:fixme:ntdll:NtSetInformationToken TokenIntegrityLevel stub!
0154:fixme:ntdll:NtFilterToken flags 0x1 unsupported
0154:fixme:ntdll:NtFilterToken support for restricting sids not yet implemented
[252:0105/192545.094:ERROR:gpu_process_host.cc(968)] GPU process launch failed: error_code=49
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000000000000000 len=0 000000000CCFEF9C),stub!
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 00000518007541A0 len=40 000000000CCFEF9C),stub!
0154:fixme:ntdll:NtSetInformationToken TokenIntegrityLevel stub!
0154:fixme:ntdll:NtFilterToken flags 0x1 unsupported
0154:fixme:ntdll:NtFilterToken support for restricting sids not yet implemented
[252:0105/192545.279:ERROR:gpu_process_host.cc(968)] GPU process launch failed: error_code=49
01b4:fixme:winsock:setsockopt Ignoring SO_RANDOMIZE_PORT
01b4:fixme:winsock:setsockopt Ignoring SO_RANDOMIZE_PORT
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000000000000000 len=0 000000000CCFEF9C),stub!
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000051800BAFE90 len=40 000000000CCFEF9C),stub!
0154:fixme:ntdll:NtSetInformationToken TokenIntegrityLevel stub!
0154:fixme:ntdll:NtFilterToken flags 0x1 unsupported
0154:fixme:ntdll:NtFilterToken support for restricting sids not yet implemented
[252:0105/192545.464:ERROR:gpu_process_host.cc(968)] GPU process launch failed: error_code=49
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000000000000000 len=0 000000000CCFEF9C),stub!
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000051800CABF50 len=40 000000000CCFEF9C),stub!
0154:fixme:ntdll:NtSetInformationToken TokenIntegrityLevel stub!
0154:fixme:ntdll:NtFilterToken flags 0x1 unsupported
0154:fixme:ntdll:NtFilterToken support for restricting sids not yet implemented
[252:0105/192545.671:ERROR:gpu_process_host.cc(968)] GPU process launch failed: error_code=49
[252:0105/192545.671:FATAL:gpu_data_manager_impl_private.cc(450)] GPU process isn't usable. Goodbye.
wine: Unhandled exception 0x80000003 in thread 100 at address 000000014172A56F (thread 0100), starting debugger...
0224:fixme:imm:ImeSetActiveContext (0x254810, 1): stub
0224:fixme:imm:ImmReleaseContext (000000000001009A, 0000000000254810): stub
01b4:fixme:winsock:setsockopt Ignoring SO_RANDOMIZE_PORT
01c8:fixme:file:ReplaceFileW Ignoring flags 2
01c8:fixme:file:ReplaceFileW Ignoring flags 2
wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
</code>```

Here the backtrace got clicking "Show Details" in the program error window :
https://drive.google.com/file/d/1sDAsIFyWlHQ0fxMM3nZ8d4R4orFJTgGK/view?usp=share_link

From the command-line output:  I guess that something wrong happens during the making of the squirrel distributable for win32/x64

Other info:

```<code>Electron : 19
node : 18
</code>```

How to debug and detect the root causes of the issue?
How to make it work?

Body:
I installed Wine in Ubuntu 22.04 and I executed yarn make --platform=win32 in order to produce the .exe executable Electron file, I get some strange errors:

raphy@raohy:~/ForgeTypescriptReactWebpack$ yarn make --platform=win32
yarn run v1.22.19
$ electron-forge make --platform=win32
✔ Checking your system
✔ Loading configuration
✔ Resolving make targets
  › Making for the following targets: squirrel, zip
✔ Running package command
  ✔ Preparing to package application
  ✔ Running packaging hooks
    ✔ Running generateAssets hook
    ✔ Running prePackage hook
      ✔ [plugin-webpack] Preparing native dependencies: 1 / 1
      ✔ [plugin-webpack] Building webpack bundles
  ✔ Packaging application
    ✔ Packaging for x64 on win32 [27s]
  ✔ Running postPackage hook
✔ Running preMake hook
❯ Making distributables
  ✖ Making a squirrel distributable for win32/x64
    › spawn mono ENOENT
  ◼ Making a zip distributable for win32/x64
◼ Running postMake hook

An unhandled rejection has occurred inside Forge:
Error: spawn mono ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
raphy@raohy:~/ForgeTypescriptReactWebpack$

In package.json:

"scripts": {
    "make": "electron-forge make",
}

Executing via Wine the produced .exe file I get this:

raphy@raohy:~$ wine /home/raphy/ForgeTypescriptReactWebpack/out/forgetypescriptreactwebpack-win32-x64/forgetypescriptreactwebpack.exe
0100:err:winediag:ntlm_check_version ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.
0100:err:ntlm:ntlm_LsaApInitializePackage no NTLM support, expect problems
0100:fixme:powrprof:PowerRegisterSuspendResumeNotification (0x00000002,000000000081FCF0,000000000081FCE8) stub!
0104:fixme:process:NtQueryInformationProcess (0xffffffffffffffff,info_class=49,0x19efc38,0x00000008,(nil)) Unknown information class
0100:fixme:heap:RtlSetHeapInformation 0000000000000000 1 0000000000000000 0 stub

0100:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 000005180029CDB0, 16) stub
0100:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 000000000081F56C, 0000000000000000 000000000081F568
0100:fixme:nls:get_dummy_preferred_ui_language (0x38 000000000081F56C 0000000000000000 000000000081F568) returning a dummy value (current locale)
0100:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 000000000081F56C, 000000000081F552 000000000081F568
0100:fixme:nls:get_dummy_preferred_ui_language (0x38 000000000081F56C 000000000081F552 000000000081F568) returning a dummy value (current locale)
0100:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
0128:fixme:kernelbase:AppPolicyGetThreadInitializationType FFFFFFFFFFFFFFFA, 0000000006DEFE10
0100:fixme:imm:ImeSetActiveContext (0x880360, 1): stub
0100:fixme:imm:ImmReleaseContext (0000000000010062, 0000000000880360): stub
0070:fixme:imm:ImeSetActiveContext (0x25e1b0, 0): stub
0070:fixme:imm:ImmReleaseContext (0000000000010020, 000000000025E1B0): stub
0100:fixme:winsock:WSALookupServiceBeginW (000000000081F000 0x00000ff0 000000000081F078) Stub!
[252:0105/192543.562:ERROR:network_change_notifier_win.cc(225)] WSALookupServiceBegin failed with: 0
0100:fixme:iphlpapi:NotifyAddrChange (Handle 000000000081F1D8, overlapped 0000051800320090): stub
0100:fixme:win:GetPointerDevices (000000000081EB3C 0000000000000000): partial stub
0100:fixme:system:QueryDisplayConfig (00000002 000000000081EB50 0000051800278A70 000000000081EB40 0000051800688300 0000000000000000): semi-stub
0100:fixme:system:DisplayConfigGetDeviceInfo Unimplemented packet type: 11
0140:fixme:wtsapi:WTSRegisterSessionNotification Stub 0000000000020052 0x00000000
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000000000000000 len=0 000000000CCFEF9C),stub!
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 00000518007583D0 len=40 000000000CCFEF9C),stub!
0154:fixme:ntdll:NtSetInformationToken TokenIntegrityLevel stub!
0154:fixme:ntdll:NtFilterToken flags 0x1 unsupported
0154:fixme:ntdll:NtFilterToken support for restricting sids not yet implemented
0100:fixme:service:I_ScRegisterDeviceNotification Notification filters are not yet implemented.
0100:fixme:system:EnableNonClientDpiScaling (0000000000020058): stub
0100:fixme:win:RegisterTouchWindow (0000000000020058 00000002): stub
0140:fixme:wtsapi:WTSRegisterSessionNotification Stub 0000000000020056 0x00000000
0100:fixme:dwmapi:DwmSetWindowAttribute (0000000000020058, 2, 000000000081D684, 4) stub
0114:fixme:file:NtLockFile I/O completion on lock not implemented yet
0150:fixme:file:ReplaceFileW Ignoring flags 2
011c:fixme:file:ReplaceFileW Ignoring flags 2
0100:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 000000000081CA6C, 0000000000000000 000000000081CA68
0100:fixme:nls:get_dummy_preferred_ui_language (0x38 000000000081CA6C 0000000000000000 000000000081CA68) returning a dummy value (current locale)
0100:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 000000000081CA6C, 000000000081CA52 000000000081CA68
0100:fixme:nls:get_dummy_preferred_ui_language (0x38 000000000081CA6C 000000000081CA52 000000000081CA68) returning a dummy value (current locale)
0100:fixme:dwrite:dwritefontface5_HasVariations 0000000000ED0A60: stub
0100:fixme:win:RegisterPowerSettingNotification (0000000000020056,{2b84c20e-ad23-4ddf-93db-05ffbd7efca5},0): stub
0184:fixme:dwmapi:DwmGetWindowAttribute (0000000000020058 14 0000000010E7F5AC 4) stub
0100:fixme:win:GetPointerDevices (000000000081C80C 0000000000000000): partial stub
0100:fixme:system:QueryDisplayConfig (00000002 000000000081C820 0000051800ADB570 000000000081C810 0000051800AEF380 0000000000000000): semi-stub
0114:fixme:file:ReplaceFileW Ignoring flags 2
0100:fixme:system:DisplayConfigGetDeviceInfo Unimplemented packet type: 11
0100:fixme:msctf:SetInputScopes STUB: 0000000000020058 ... (null) (null)
MAIN_WINDOW_WEBPACK_ENTRY:  file://Z:\home\raphy\ForgeTypescriptReactWebpack\out\forgetypescriptreactwebpack-win32-x64\resources\app\.webpack\renderer\
main_window\index.html
0100:fixme:shcore:GetCurrentProcessExplicitAppUserModelID 000000000081CC60: stub
0100:fixme:win:RegisterTouchWindow (0000000000010080 00000002): stub
[252:0105/192544.046:ERROR:gpu_process_host.cc(968)] GPU process launch failed: error_code=49
0184:fixme:dwmapi:DwmGetWindowAttribute (0000000000020058 14 0000000010E7F2CC 4) stub
0180:err:winediag:ntlm_check_version ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.
0180:err:ntlm:ntlm_LsaApInitializePackage no NTLM support, expect problems
0180:fixme:powrprof:PowerRegisterSuspendResumeNotification (0x00000002,000000000081FCF0,000000000081FCE8) stub!
019c:fixme:process:NtQueryInformationProcess (0xffffffffffffffff,info_class=49,0x19efc38,0x00000008,(nil)) Unknown information class
0180:fixme:heap:RtlSetHeapInformation 0000000000000000 1 0000000000000000 0 stub
0180:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 000004CE002ACCF0, 16) stub
01b4:fixme:winsock:WSALookupServiceBeginW (0000000005ADDC10 0x00000ff0 0000000005ADDC88) Stub!
[380:0105/192544.150:ERROR:network_change_notifier_win.cc(225)] WSALookupServiceBegin failed with: 0
01b4:fixme:iphlpapi:NotifyAddrChange (Handle 0000000005ADDDE8, overlapped 000004CE0031CB10): stub
01b4:fixme:wlanapi:WlanEnumInterfaces (0000000000000001, 0000000000000000, 0000000005ADCE68) semi-stub
01b4:fixme:wlanapi:WlanEnumInterfaces (0000000000000001, 0000000000000000, 0000000005ADCE68) semi-stub
01b4:fixme:winsock:setsockopt Ignoring SO_RANDOMIZE_PORT
0100:fixme:msctf:SetInputScopes STUB: 0000000000020058 ... (null) (null)
0100:fixme:msctf:SetInputScopes STUB: 0000000000020058 ... (null) (null)
0198:err:winediag:ntlm_check_version ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.
0198:err:ntlm:ntlm_LsaApInitializePackage no NTLM support, expect problems
0198:fixme:powrprof:PowerRegisterSuspendResumeNotification (0x00000002,000000000081FCF0,000000000081FCE8) stub!
01d4:fixme:process:NtQueryInformationProcess (0xffffffffffffffff,info_class=49,0x19efc38,0x00000008,(nil)) Unknown information class
0198:fixme:heap:RtlSetHeapInformation 0000000000000000 1 0000000000000000 0 stub
0198:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 000000CA002A0F30, 16) stub
0198:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
0198:fixme:thread:QueryThreadCycleTime (FFFFFFFFFFFFFFFE,000000000081EAE8): stub!
0218:fixme:kernelbase:AppPolicyGetThreadInitializationType FFFFFFFFFFFFFFFA, 000000000B63FE10
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000000000000000 len=0 000000000CCFEF9C),stub!
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000051800758340 len=40 000000000CCFEF9C),stub!
0154:fixme:ntdll:NtSetInformationToken TokenIntegrityLevel stub!
0154:fixme:ntdll:NtFilterToken flags 0x1 unsupported
0154:fixme:ntdll:NtFilterToken support for restricting sids not yet implemented
[252:0105/192544.356:ERROR:gpu_process_host.cc(968)] GPU process launch failed: error_code=49
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000000000000000 len=0 000000000CCFEF9C),stub!
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000051800BAF620 len=40 000000000CCFEF9C),stub!
0154:fixme:ntdll:NtSetInformationToken TokenIntegrityLevel stub!
0154:fixme:ntdll:NtFilterToken flags 0x1 unsupported
0154:fixme:ntdll:NtFilterToken support for restricting sids not yet implemented
[252:0105/192544.545:ERROR:gpu_process_host.cc(968)] GPU process launch failed: error_code=49
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000000000000000 len=0 000000000CCFEF9C),stub!
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000051800CA6BE0 len=40 000000000CCFEF9C),stub!
0154:fixme:ntdll:NtSetInformationToken TokenIntegrityLevel stub!
0154:fixme:ntdll:NtFilterToken flags 0x1 unsupported
0154:fixme:ntdll:NtFilterToken support for restricting sids not yet implemented
[252:0105/192544.729:ERROR:gpu_process_host.cc(968)] GPU process launch failed: error_code=49
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000000000000000 len=0 000000000CCFEF9C),stub!
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000051800BAFC20 len=40 000000000CCFEF9C),stub!
0154:fixme:ntdll:NtSetInformationToken TokenIntegrityLevel stub!
0154:fixme:ntdll:NtFilterToken flags 0x1 unsupported
0154:fixme:ntdll:NtFilterToken support for restricting sids not yet implemented
[252:0105/192544.911:ERROR:gpu_process_host.cc(968)] GPU process launch failed: error_code=49
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000000000000000 len=0 000000000CCFEF9C),stub!
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000051800CA64F0 len=40 000000000CCFEF9C),stub!
0154:fixme:ntdll:NtSetInformationToken TokenIntegrityLevel stub!
0154:fixme:ntdll:NtFilterToken flags 0x1 unsupported
0154:fixme:ntdll:NtFilterToken support for restricting sids not yet implemented
[252:0105/192545.094:ERROR:gpu_process_host.cc(968)] GPU process launch failed: error_code=49
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000000000000000 len=0 000000000CCFEF9C),stub!
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 00000518007541A0 len=40 000000000CCFEF9C),stub!
0154:fixme:ntdll:NtSetInformationToken TokenIntegrityLevel stub!
0154:fixme:ntdll:NtFilterToken flags 0x1 unsupported
0154:fixme:ntdll:NtFilterToken support for restricting sids not yet implemented
[252:0105/192545.279:ERROR:gpu_process_host.cc(968)] GPU process launch failed: error_code=49
01b4:fixme:winsock:setsockopt Ignoring SO_RANDOMIZE_PORT
01b4:fixme:winsock:setsockopt Ignoring SO_RANDOMIZE_PORT
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000000000000000 len=0 000000000CCFEF9C),stub!
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000051800BAFE90 len=40 000000000CCFEF9C),stub!
0154:fixme:ntdll:NtSetInformationToken TokenIntegrityLevel stub!
0154:fixme:ntdll:NtFilterToken flags 0x1 unsupported
0154:fixme:ntdll:NtFilterToken support for restricting sids not yet implemented
[252:0105/192545.464:ERROR:gpu_process_host.cc(968)] GPU process launch failed: error_code=49
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000000000000000 len=0 000000000CCFEF9C),stub!
0154:fixme:winstation:GetUserObjectSecurity (0000000000000008 000000000CCFEF98 0000051800CABF50 len=40 000000000CCFEF9C),stub!
0154:fixme:ntdll:NtSetInformationToken TokenIntegrityLevel stub!
0154:fixme:ntdll:NtFilterToken flags 0x1 unsupported
0154:fixme:ntdll:NtFilterToken support for restricting sids not yet implemented
[252:0105/192545.671:ERROR:gpu_process_host.cc(968)] GPU process launch failed: error_code=49
[252:0105/192545.671:FATAL:gpu_data_manager_impl_private.cc(450)] GPU process isn't usable. Goodbye.
wine: Unhandled exception 0x80000003 in thread 100 at address 000000014172A56F (thread 0100), starting debugger...
0224:fixme:imm:ImeSetActiveContext (0x254810, 1): stub
0224:fixme:imm:ImmReleaseContext (000000000001009A, 0000000000254810): stub
01b4:fixme:winsock:setsockopt Ignoring SO_RANDOMIZE_PORT
01c8:fixme:file:ReplaceFileW Ignoring flags 2
01c8:fixme:file:ReplaceFileW Ignoring flags 2
wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.

Here the backtrace got clicking "Show Details" in the program error window :
https://drive.google.com/file/d/1sDAsIFyWlHQ0fxMM3nZ8d4R4orFJTgGK/view?usp=share_link

From the command-line output:  I guess that something wrong happens during the making of the squirrel distributable for win32/x64

Other info:

Electron : 19
node : 18

How to debug and detect the root causes of the issue?
How to make it work?


来源: stackexchange

问:
WDIO v8 - Element not found second screen :: Native apps (Android/iOS) #9540
I am facing 'Element not found error' on the second screen which also happens to be a bottom sheet/layover screen.
I can click on a button on the first screen to navigate to the second screen.

I have verified the locators and it works fine in Java/Appium. Please suggest

ContentLicense: CC BY-SA 4.0


问:
How can an admin add a private Power-Up to a Trello workspace?
I have developed a Power-Up in a personal Trello workspace, and now it must be implemented in a different, shared workspace where I am not an admin.

How can the admin for that other workspace add my Power-Up to it?

Given that my Power-Up is not published in Atlassian's public directory, searching for it after clicking that workspace's Add Power-Ups button fails to find it.

I don't want to have it appear in the public directory, but I have not been able to discover any way to let that other person find it and enabled it on their workspace.

Any ideas?

-Ken


问:
AWS EMR Spark not able to save table in Hive
Spark application is trying to save data to Hive table (S3 configured) but it is failing to access a "/tmp/hive" directory (in S3). I've set the below config and .enableHiveSupport on sparkSession object. All the EMR instance has access to read/write to the below bucket.

```<code>spark.sql.warehouse.dir
s3://smt-sessionizer-stage-out/spark/hive/metastore
</code>```

Error:

```<code>23/01/05 17:44:52 INFO HiveUtils: Initializing HiveMetastoreConnection version 2.3.7-amzn-4 using Spark classes.
23/01/05 17:44:52 INFO HiveConf: Found configuration file file:/etc/spark/conf.dist/hive-site.xml
23/01/05 17:44:52 WARN HiveConf: HiveConf of name hive.server2.thrift.url does not exist
org.apache.spark.sql.AnalysisException: java.lang.RuntimeException: java.nio.file.AccessDeniedException: tmp/hive/: PUT 0-byte object  on tmp/hive/: com.amazonaws.services.s3.model.AmazonS3Exception: Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: 1BPCGWXXYGQ7Y6SE; S3 Extended Request ID: F12HhZZOLPEkok/MNvhXXLSJesYMMvmHCQbN+6XUetg2DzM8Iu1Oe0MjkjM160Mxg54FtEFLKS4=; Proxy: null), S3 Extended Request ID: F12HhZZOLPEkok/MNvhXXLSJesYMMvmHCQbN+6XUetg2DzM8Iu1Oe0MjkjM160Mxg54FtEFLKS4=:AccessDenied
    at org.apache.spark.sql.hive.HiveExternalCatalog.withClient(HiveExternalCatalog.scala:135)
    at org.apache.spark.sql.hive.HiveExternalCatalog.databaseExists(HiveExternalCatalog.scala:249)
    at org.apache.spark.sql.internal.SharedState.externalCatalog$lzycompute(SharedState.scala:135)
    at org.apache.spark.sql.internal.SharedState.externalCatalog(SharedState.scala:125)
</code>```

Body:
Spark application is trying to save data to Hive table (S3 configured) but it is failing to access a "/tmp/hive" directory (in S3). I've set the below config and .enableHiveSupport on sparkSession object. All the EMR instance has access to read/write to the below bucket.

spark.sql.warehouse.dir
s3://smt-sessionizer-stage-out/spark/hive/metastore

Error:

23/01/05 17:44:52 INFO HiveUtils: Initializing HiveMetastoreConnection version 2.3.7-amzn-4 using Spark classes.
23/01/05 17:44:52 INFO HiveConf: Found configuration file file:/etc/spark/conf.dist/hive-site.xml
23/01/05 17:44:52 WARN HiveConf: HiveConf of name hive.server2.thrift.url does not exist
org.apache.spark.sql.AnalysisException: java.lang.RuntimeException: java.nio.file.AccessDeniedException: tmp/hive/: PUT 0-byte object  on tmp/hive/: com.amazonaws.services.s3.model.AmazonS3Exception: Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: 1BPCGWXXYGQ7Y6SE; S3 Extended Request ID: F12HhZZOLPEkok/MNvhXXLSJesYMMvmHCQbN+6XUetg2DzM8Iu1Oe0MjkjM160Mxg54FtEFLKS4=; Proxy: null), S3 Extended Request ID: F12HhZZOLPEkok/MNvhXXLSJesYMMvmHCQbN+6XUetg2DzM8Iu1Oe0MjkjM160Mxg54FtEFLKS4=:AccessDenied
    at org.apache.spark.sql.hive.HiveExternalCatalog.withClient(HiveExternalCatalog.scala:135)
    at org.apache.spark.sql.hive.HiveExternalCatalog.databaseExists(HiveExternalCatalog.scala:249)
    at org.apache.spark.sql.internal.SharedState.externalCatalog$lzycompute(SharedState.scala:135)
    at org.apache.spark.sql.internal.SharedState.externalCatalog(SharedState.scala:125)


问:
how to add a new column on pandas data frame using the column of same data frame which consists of lists after .apply(lambda x: np.sum(x ** 2))
how to add a new column on pandas data frame using the column of same data frame which consists of lists after applying to each list I tried to convert that column dtyoe which is python object to_numpy array but
in vain. Bascially I want to apply this .apply(lambda x: np.sum(x ** 2)) operation on each row of a column bwllow is the code of what i'm actually trying to do i'm bascially bulding a cosine similarity function using pandas</p>
```<code>df = pd.read_parquet(dataset_path, engine='fastparquet')

    df['dot_product'] = df['emb'].apply(lambda x: np.dot(x, embedding_vector))

    embedding_squared = np.sum(embedding_vector ** 2)
    df['dataset_squared'] = df['emb'].apply(lambda x: np.sum(x ** 2))

    df['similarity'] = df['dot_product'] / np.sqrt(embedding_squared * df['dataset_squared'])

    similar_rows = df[df['similarity'] >= threshold]
</code>```

Body:
how to add a new column on pandas data frame using the column of same data frame which consists of lists after applying to each list I tried to convert that column dtyoe which is python object to_numpy array but
in vain. Bascially I want to apply this .apply(lambda x: np.sum(x ** 2)) operation on each row of a column bwllow is the code of what i'm actually trying to do i'm bascially bulding a cosine similarity function using pandas

df = pd.read_parquet(dataset_path, engine='fastparquet')

    df['dot_product'] = df['emb'].apply(lambda x: np.dot(x, embedding_vector))

    embedding_squared = np.sum(embedding_vector ** 2)
    df['dataset_squared'] = df['emb'].apply(lambda x: np.sum(x ** 2))

    df['similarity'] = df['dot_product'] / np.sqrt(embedding_squared * df['dataset_squared'])

    similar_rows = df[df['similarity'] >= threshold]


问:
Black screen on android device how to fix?
adb devices

List of devices attached

emulator-5554   offline

i tried every single step from internet wipe data cool boot etc gradle give zero errors just help me guys

Run android virtual device


问:
Why does this work? -- Making a grid take the full height of its parent and locking the height in w/ flex-col and [Tailwindcss + React/Vite]
I'm really confused and I'm hoping someone can help me because I tried researching this and found nothing.

My goal was to make a grid take the full height of its parent and 'lock it in there'. This way, I can have one of my columns have the overflow-y-auto class.'

Thing is, that parent doesn't have a set height because I used the flex-grow attribute in my App.jsx file.

I tried many things, and then out of a whim, I just applied a default height to the grid, and it worked!

My question: Why is this working?! And is there a better way?

So, for context:

App.jsx:

```<code>    <BrowserRouter>
      <div className='flex flex-col items-center min-h-screen min-w-screen bg-gradient-to-t from-bgGr1 to-bgGr2'>
        <NavBar className='grow-0' />
        <div className='flex flex-col flex-grow max-w-7xl w-full px-4 sm:px-6 lg:px-8 py-8 text-text'>
          <Routes>
            <Route path='/' element={<Home />}></Route>
            <Route path='/characters/:region/:realm/:playerName' element={<PlayerPage />}></Route>
            <Route path='/sc/admin/upload' element={<DataUpload />}></Route>
            <Route path='*' element={<Navigate to='/' />}></Route>
          </Routes>
        </div>
        <Footer className='grow-0' />
      </div>
    </BrowserRouter>
</code>```

PlayerPage.jsx

```<code>    <div className='flex flex-col flex-grow bg-secondary'>
      <div className='grid grid-cols-5 flex-grow h-8'>
        <div className='bg-test2 col-span-2 text-7xl overflow-auto'>
          Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem commodi nisi autem numquam, totam, minima illo ad maiores ipsa nostrum rem
          similique ea debitis animi ullam quasi! Magnam, delectus minus. Animi sint incidunt impedit dolores assumenda in quaerat id, pariatur voluptas odio
          aut laboriosam, delectus autem consequuntur est aperiam quae rerum veniam aspernatur praesentium obcaecati doloremque voluptatum cupiditate eum. Qui?
          Inventore pariatur asperiores doloribus in dolorum amet provident, sit voluptatum natus. Molestias nihil cum, sint est voluptate architecto
          consequuntur. Harum iure deserunt amet voluptatum sit corrupti, repellendus inventore a laboriosam. Corrupti voluptatibus quae totam aliquid,
          obcaecati eaque eum aperiam vero voluptatum? Rem odit totam excepturi quam in ea consequatur. Nemo, odio mollitia? Praesentium ad quo porro repellat
          accusamus necessitatibus sequi? Recusandae esse rem consequatur quae sint ad ut quaerat totam accusamus voluptatibus quos culpa eos doloribus officia
          voluptatem iste blanditiis dolore quia hic qui animi, excepturi deleniti? Exercitationem, nam itaque.
        </div>
        <div className='bg-test1 col-span-3 md:col-span-5'>hi</div>
      </div>
    </div>
</code>```

End result:
Render of the webpage

So I'm really confused. Why is this working? Can someone help me understand? Perhaps there's a better way to do this.

Body:
I'm really confused and I'm hoping someone can help me because I tried researching this and found nothing.

My goal was to make a grid take the full height of its parent and 'lock it in there'. This way, I can have one of my columns have the overflow-y-auto class.'

Thing is, that parent doesn't have a set height because I used the flex-grow attribute in my App.jsx file.

I tried many things, and then out of a whim, I just applied a default height to the grid, and it worked!

My question: Why is this working?! And is there a better way?

So, for context:

App.jsx:

    <BrowserRouter>

        <NavBar className='grow-0' />

          <Routes>
            <Route path='/' element={<Home />}></Route>
            <Route path='/characters/:region/:realm/:playerName' element={<PlayerPage />}></Route>
            <Route path='/sc/admin/upload' element={<DataUpload />}></Route>
            <Route path='*' element={<Navigate to='/' />}></Route>
          </Routes>

    </BrowserRouter>

PlayerPage.jsx

          Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem commodi nisi autem numquam, totam, minima illo ad maiores ipsa nostrum rem
          similique ea debitis animi ullam quasi! Magnam, delectus minus. Animi sint incidunt impedit dolores assumenda in quaerat id, pariatur voluptas odio
          aut laboriosam, delectus autem consequuntur est aperiam quae rerum veniam aspernatur praesentium obcaecati doloremque voluptatum cupiditate eum. Qui?
          Inventore pariatur asperiores doloribus in dolorum amet provident, sit voluptatum natus. Molestias nihil cum, sint est voluptate architecto
          consequuntur. Harum iure deserunt amet voluptatum sit corrupti, repellendus inventore a laboriosam. Corrupti voluptatibus quae totam aliquid,
          obcaecati eaque eum aperiam vero voluptatum? Rem odit totam excepturi quam in ea consequatur. Nemo, odio mollitia? Praesentium ad quo porro repellat
          accusamus necessitatibus sequi? Recusandae esse rem consequatur quae sint ad ut quaerat totam accusamus voluptatibus quos culpa eos doloribus officia
          voluptatem iste blanditiis dolore quia hic qui animi, excepturi deleniti? Exercitationem, nam itaque.

hi

End result:
Render of the webpage

So I'm really confused. Why is this working? Can someone help me understand? Perhaps there's a better way to do this.


问:
Identify photos with black parts in react native app
I have an issue with photos having black areas in react native app. When the user takes a photo, it sometimes appears to have black areas which I need to prevent.

What I want is to recognize that the photo has black parts, so I can discard the photo and ask users to take another photo. Is there anyway to achieve that with a native JavaScript API or any external library?

I expect photos with dark parts to be detected when the user takes a photo.


问:
save .xlsx file writen by pandas and export as a django model
I am going to have a web app that does some processing on user data and is going to give him/her back an excel file of processed data in Django.

here is my app/views.py function:

```<code>@login_required(login_url='/signin/')
def processing(request):
    ...
    # read imported file (uploaded by user) and do the process.
    # finally have 3 uf, vf, wf array.
    ...

    # save the file in "excel_file = models.FileField"
    from pandas import DataFrame, ExcelWriter
    data = {
       'uf': uf,
       'vf': vf,
       'wf': wf,
    }
    excel_data = DataFrame(excel_data)

    despiked = Despiking(
        #other models

        excel_file=excel_data.to_excel(???),
        )
        despiked.save()

    return render(request, 'filteration/despiking.html', context=context)
</code>```

how can I save the excel_data into its model (excel_file) and create its media into Media directory?

I already have read django pandas dataframe download as excel file question, but wasn't able to fix the problem with HttpResponse. any help would be greatly appreciated

Body:
I am going to have a web app that does some processing on user data and is going to give him/her back an excel file of processed data in Django.

here is my app/views.py function:

@login_required(login_url='/signin/')
def processing(request):
    ...
    # read imported file (uploaded by user) and do the process.
    # finally have 3 uf, vf, wf array.
    ...

    # save the file in "excel_file = models.FileField"
    from pandas import DataFrame, ExcelWriter
    data = {
       'uf': uf,
       'vf': vf,
       'wf': wf,
    }
    excel_data = DataFrame(excel_data)

    despiked = Despiking(
        #other models

        excel_file=excel_data.to_excel(???),
        )
        despiked.save()

    return render(request, 'filteration/despiking.html', context=context)

how can I save the excel_data into its model (excel_file) and create its media into Media directory?

I already have read django pandas dataframe download as excel file question, but wasn't able to fix the problem with HttpResponse. any help would be greatly appreciated


问:
Why is fetch() request with get method not recognized by caches.match(event.request)?
I am building a pwa with offline support. I use cache-then-network strategy to cache dynamic pages, and all works well (i.e - cached pages are being served from the cache, and it works when offline as well).

Now I am trying to implement the same strategy for fetch() method.

When I use the get method, the response behaves the same as a regular page request, and is saved to the dynamic cache, and on subsequent requests it is served from the cache. It also works when offline.

But when I use post method, the response is saved in the cache (I see it in the dev tools cache storage), but it isn't served from there on subsequent requests. And when I'm offline, the request isn't resolved, and we get to the catch segment and receive the err message: Oops. fetch failed.  SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON

Here is my fetch request:

```<code> fetch(url, {
                method: 'post', // <--- when I change this to get all works well
                headers: {
                    "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
                    },
                credentials: 'include'
            })
            .then(get_json) // get_json is defined below
            .then(function (data) {
                $("#expanded_" + u_id).html(data.view);
            })
            .catch(function (error) {
                console.log('Oops. fetch failed. ', error);
            });
</code>```

x

```<code>function get_json(response) {
   return response.json();
}
</code>```

In case it matters, I should say that I'm still on localhost.

My conclusion is that the caches.match(event.request) in my service worker isn't recognizing the fetch request when it is sent via post method, only via get.

So - is there any specific configuration for a post fetch? Something that I need to change in the way the service worker is handling the request? Any pointers would be highly appreciated!

Body:
I am building a pwa with offline support. I use cache-then-network strategy to cache dynamic pages, and all works well (i.e - cached pages are being served from the cache, and it works when offline as well).

Now I am trying to implement the same strategy for fetch() method.

When I use the get method, the response behaves the same as a regular page request, and is saved to the dynamic cache, and on subsequent requests it is served from the cache. It also works when offline.

But when I use post method, the response is saved in the cache (I see it in the dev tools cache storage), but it isn't served from there on subsequent requests. And when I'm offline, the request isn't resolved, and we get to the catch segment and receive the err message: Oops. fetch failed.  SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON

Here is my fetch request:

 fetch(url, {
                method: 'post', // <--- when I change this to get all works well
                headers: {
                    "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
                    },
                credentials: 'include'
            })
            .then(get_json) // get_json is defined below
            .then(function (data) {
                $("#expanded_" + u_id).html(data.view);
            })
            .catch(function (error) {
                console.log('Oops. fetch failed. ', error);
            });

x

function get_json(response) {
   return response.json();
}

In case it matters, I should say that I'm still on localhost.

My conclusion is that the caches.match(event.request) in my service worker isn't recognizing the fetch request when it is sent via post method, only via get.

So - is there any specific configuration for a post fetch? Something that I need to change in the way the service worker is handling the request? Any pointers would be highly appreciated!


问:
Why is same key cookie is set twice with different values?
I am setting a loggedIn cookie when user logins.

It is set using -
document.cookie = `token=${data.data.token}; path=/;}

Now my chrome dev tools shows:
1
 Cookies" />

And when I do document.cookie it returns two cookies
2

I have only set the cookie which is shown in 1 but not 2 but this still shows up.

I tried refreshing the page, force clearing all the cookies but didn't worked.
One more intersting thing about it is that the cookie in pic 2 i.ie., token=540c13d-... does not change on relogin or changing login accounts.

What might be the reason for such a behaviour?


问:
Cannot read properties of null (reading 'selectedIndex')
Why does i can't get the select index of my select? the output is always undefined and sometimes 0 why does i cannot get the select? if i use this one

```<code>var index = document.getElementById("#product_"+row_id).selectedIndex;
</code>```

its giving me an error of

Cannot read properties of null (reading 'selectedIndex')

what seems the problem?

```<code>$(document).ready(function() {
 $(".select_group").select2();
   $("#OrderMainNav").addClass('active');
   $("#createOrderSubMenu").addClass('active');

var btnCust = '<button type="button" class="btn btn-secondary" title="Add picture tags" ' +
    'onclick="alert(\'Call your custom code here.\')">' +
    '<i class="glyphicon glyphicon-tag"></i>' +
    '</button>';

// Add new row in the table
$("#add_row").unbind('click').bind('click', function() {
  $.ajax({
      url: base_url + '/orders/getTableProductRow/',
      type: 'post',
      dataType: 'json',
      success:function(response) {
          var table = $("#product_info_table");
          var count_table_tbody_tr = $("#product_info_table tbody tr").length;
          var row_id = count_table_tbody_tr + 1;
                         var html = '<tr id="row_'+row_id+'">'+
               '<td>'+
                '<select class="form-control select_group product update-select" data-row-id="'+row_id+'" id="product_'+row_id+'" name="product[]" style="width:100%;" onchange="getProductData('+row_id+')">'+
                    '<option selected>--Select Products--</option>';
                    $.each(response, function(index, value) {
                      html += '<option value="'+value.id+'">'+value.name+'</option>';
                    });

                  html += '</select>'+
                '</td>'+
                 '<td><input placeholder="Available Qty" type="text" name="availqty1[]" id="availqty_'+row_id+'" class="form-control" disabled><input type="hidden" name="availqty_value1[]" id="availqty_value_'+row_id+'" class="form-control"></td>'+
                '<td><input placeholder="Quantity" type="number" name="qty[]" id="qty_'+row_id+'" class="form-control" onclick="getTotal('+row_id+')" onkeyup="getTotal('+row_id+')"></td>'+
                '<td><input placeholder="Rate" type="text" name="rate[]" id="rate_'+row_id+'" class="form-control" disabled><input type="hidden" name="rate_value[]" id="rate_value_'+row_id+'" class="form-control"></td>'+
                '<td><input placeholder="Amount" type="text" name="amount[]" id="amount_'+row_id+'" class="form-control" disabled><input type="hidden" name="amount_value[]" id="amount_value_'+row_id+'" class="form-control"></td>'+
                '<td><button type="button" class="btn btn-danger" onclick="removeRow(\''+row_id+'\')"><i class="fa fa-close"></i></button></td>'+
                '</tr>';

            if(count_table_tbody_tr >= 1) {
            $("#product_info_table tbody tr:last").after(html);

          }
          else {
            $("#product_info_table tbody").html(html);
          }

          $(".product").select2();
          //console.log(info);
          //console.log(index);
          //var index = document.getElementById("#product_"+row_id).selectedIndex;
          //var index = $("#product_"+row_id).get(0).selectedIndex;
          //var product_id = $("#product_"+row_id).val();
         // var value = $('.update-select').selectedIndex;
          //console.log(value);

         //HERE I CAN'T GET THE INDEX SO I PUT 2 WHAT IS THE CORRECT WAY TO GET THE INDEX?
          $('#product_'+row_id+' option:eq(' + 2 + ')').remove();

      }
    });

  return false;
});
});
</code>```

Body:
Why does i can't get the select index of my select? the output is always undefined and sometimes 0 why does i cannot get the select? if i use this one

var index = document.getElementById("#product_"+row_id).selectedIndex;

its giving me an error of

Cannot read properties of null (reading 'selectedIndex')

what seems the problem?

$(document).ready(function() {
 $(".select_group").select2();
   $("#OrderMainNav").addClass('active');
   $("#createOrderSubMenu").addClass('active');

var btnCust = '<button type="button" class="btn btn-secondary" title="Add picture tags" ' +
    'onclick="alert(\'Call your custom code here.\')">' +
    '' +
    '</button>';

// Add new row in the table
$("#add_row").unbind('click').bind('click', function() {
  $.ajax({
      url: base_url + '/orders/getTableProductRow/',
      type: 'post',
      dataType: 'json',
      success:function(response) {
          var table = $("#product_info_table");
          var count_table_tbody_tr = $("#product_info_table tbody tr").length;
          var row_id = count_table_tbody_tr + 1;
                         var html = '
'+
               ''+
                '<select class="form-control select_group product update-select" data-row-id="'+row_id+'" id="product_'+row_id+'" name="product[]" style="width:100%;" onchange="getProductData('+row_id+')">'+
                    '<option selected>--Select Products--</option>';
                    $.each(response, function(index, value) {
                      html += '<option value="'+value.id+'">'+value.name+'</option>';
                    });

                  html += '</select>'+
                '	'+
                 '<input placeholder="Available Qty" type="text" name="availqty1[]" id="availqty_'+row_id+'" class="form-control" disabled><input type="hidden" name="availqty_value1[]" id="availqty_value_'+row_id+'" class="form-control">	'+
                '<input placeholder="Quantity" type="number" name="qty[]" id="qty_'+row_id+'" class="form-control" onclick="getTotal('+row_id+')" onkeyup="getTotal('+row_id+')">	'+
                '<input placeholder="Rate" type="text" name="rate[]" id="rate_'+row_id+'" class="form-control" disabled><input type="hidden" name="rate_value[]" id="rate_value_'+row_id+'" class="form-control">	'+
                '<input placeholder="Amount" type="text" name="amount[]" id="amount_'+row_id+'" class="form-control" disabled><input type="hidden" name="amount_value[]" id="amount_value_'+row_id+'" class="form-control">	'+
                '<button type="button" class="btn btn-danger" onclick="removeRow(\''+row_id+'\')"></button>	'+
                '
';

            if(count_table_tbody_tr >= 1) {
            $("#product_info_table tbody tr:last").after(html);

          }
          else {
            $("#product_info_table tbody").html(html);
          }

          $(".product").select2();
          //console.log(info);
          //console.log(index);
          //var index = document.getElementById("#product_"+row_id).selectedIndex;
          //var index = $("#product_"+row_id).get(0).selectedIndex;
          //var product_id = $("#product_"+row_id).val();
         // var value = $('.update-select').selectedIndex;
          //console.log(value);

         //HERE I CAN'T GET THE INDEX SO I PUT 2 WHAT IS THE CORRECT WAY TO GET THE INDEX?
          $('#product_'+row_id+' option:eq(' + 2 + ')').remove();

      }
    });

  return false;
});
});


问:
How do I only show results of documents created within 24 hours
I'm creating a story feature and would only like to show posts that have been made within 24 hours.

I presume I use the timestamp and todays date to filter the results, but I'm unsure how I would do it.

My code is below:

```<code>    func fetchStories(completion: @escaping([Story]) -> Void) {
    Firestore.firestore().collection("stories")
        .order(by: "timestamp", descending: true)
        .getDocuments { snapshot, _ in
            guard let documents = snapshot?.documents else { return }
            let stories = documents.compactMap({ try? $0.data(as: Story.self) })
            completion(stories)
        }
}
</code>```

Story object:

struct Story: Identifiable, Decodable {
@DocumentID var id: String?
let timestamp: Timestamp
let photoUrl: String
let uid: String
var likes: Int

```<code>var user: User?
var didLike: Bool? = false

var timestampString: String {
    let formatter = DateComponentsFormatter()
    formatter.allowedUnits = [.second, .minute, .hour, .day, .weekOfMonth]
    formatter.maximumUnitCount = 1
    formatter.unitsStyle = .abbreviated
    return formatter.string(from: timestamp.dateValue(), to: Date()) ?? ""
}
</code>```

}

Body:
I'm creating a story feature and would only like to show posts that have been made within 24 hours.

I presume I use the timestamp and todays date to filter the results, but I'm unsure how I would do it.

My code is below:

    func fetchStories(completion: @escaping([Story]) -> Void) {
    Firestore.firestore().collection("stories")
        .order(by: "timestamp", descending: true)
        .getDocuments { snapshot, _ in
            guard let documents = snapshot?.documents else { return }
            let stories = documents.compactMap({ try? $0.data(as: Story.self) })
            completion(stories)
        }
}

Story object:

struct Story: Identifiable, Decodable {
@DocumentID var id: String?
let timestamp: Timestamp
let photoUrl: String
let uid: String
var likes: Int

var user: User?
var didLike: Bool? = false

var timestampString: String {
    let formatter = DateComponentsFormatter()
    formatter.allowedUnits = [.second, .minute, .hour, .day, .weekOfMonth]
    formatter.maximumUnitCount = 1
    formatter.unitsStyle = .abbreviated
    return formatter.string(from: timestamp.dateValue(), to: Date()) ?? ""
}

}


问:
Frontend is not accessible after creating custom server in nextjs
I have created custom server in nextjs app but, when I run npm run dev, the server starts but, I get 404 not found when try to access the frontend.

Below is my custom server code

```<code>import '@babel/polyfill';
import dotenv from 'dotenv';
import 'isomorphic-fetch';
import next from 'next';
import Koa from 'koa';
import mongo from 'koa-mongo';
import cors from '@koa/cors';
import Router from 'koa-router';
import serve from 'koa-static';
import conditional from 'koa-conditional-get';
import etag from 'koa-etag';
import cacheControl from 'koa-cache-control';
import staticCache from 'koa-static-cache';
import MongoClientConnection from './db';
import bcrypt from 'bcryptjs';

dotenv.config();
const port = parseInt(process.env.PORT, 10) || 8080;
const dev = process.env.NODE_ENV !== 'production';
const app = next({ dev });
const handle = app.getRequestHandler();
app.prepare().then(async () => {
  const server = new Koa();
  const router = new Router();
  server.use(
    cors({
      origin: '*',
    })
  );
  server.on('error', (err) => {
    const errorMessage = err.toString();
    if (
      errorMessage !=
        'BadRequestError: Expected a valid shop query parameter' &&
      errorMessage != 'ClientError [BadRequestError]: Malicious Path'
    ) {
      if (errorMessage.startsWith('TimeoutError')) {
        console.log('Timeout restarting');
        process.exit(1);
      }
    }
  });

  server.use(router.allowedMethods());
  server.use(router.routes());
  server.listen(port, () => {
    console.log(`> Ready on http://localhost:${port}`);
  });
});

</code>```

and below is dev command in package.json file

```<code> "dev": "cross-env NODE_ENV=development nodemon ./server/index.js --watch ./server/index.js",
</code>```

How can I access frontend after running npm run dev command?

Body:
I have created custom server in nextjs app but, when I run npm run dev, the server starts but, I get 404 not found when try to access the frontend.

Below is my custom server code

import '@babel/polyfill';
import dotenv from 'dotenv';
import 'isomorphic-fetch';
import next from 'next';
import Koa from 'koa';
import mongo from 'koa-mongo';
import cors from '@koa/cors';
import Router from 'koa-router';
import serve from 'koa-static';
import conditional from 'koa-conditional-get';
import etag from 'koa-etag';
import cacheControl from 'koa-cache-control';
import staticCache from 'koa-static-cache';
import MongoClientConnection from './db';
import bcrypt from 'bcryptjs';

dotenv.config();
const port = parseInt(process.env.PORT, 10) || 8080;
const dev = process.env.NODE_ENV !== 'production';
const app = next({ dev });
const handle = app.getRequestHandler();
app.prepare().then(async () => {
  const server = new Koa();
  const router = new Router();
  server.use(
    cors({
      origin: '*',
    })
  );
  server.on('error', (err) => {
    const errorMessage = err.toString();
    if (
      errorMessage !=
        'BadRequestError: Expected a valid shop query parameter' &&
      errorMessage != 'ClientError [BadRequestError]: Malicious Path'
    ) {
      if (errorMessage.startsWith('TimeoutError')) {
        console.log('Timeout restarting');
        process.exit(1);
      }
    }
  });

  server.use(router.allowedMethods());
  server.use(router.routes());
  server.listen(port, () => {
    console.log(`> Ready on http://localhost:${port}`);
  });
});

and below is dev command in package.json file

 "dev": "cross-env NODE_ENV=development nodemon ./server/index.js --watch ./server/index.js",

How can I access frontend after running npm run dev command?


问:
Camera to computer high latency
I am connecting a Fujifilm x-t3 to my computer (usb-c to usb-c) and getting the video stream using OpenCV and C++ in Visual Studio. The issue is I am getting a latency of 116 milliseconds from the real world to the computer screen. This is too high for my real time project.

As you can see in the picture below, the x-t3 digital screen shows the exact same millisecond than the counter of a smartphone (398ms), but at this moment my computer screen is still showing the millisecond 282ms. 398-282 = 116 milliseconds of latency.

116 milliseconds from Fujifilm x-t3 to my computer screen

I tried with several cameras and 116 milliseconds is the best I got.

I tried using a Macbook Pro 2019 (2.2GHz 6-Core Intel Core i7) and also a HP Elitebook Core i5, and I am getting more or less the same results.

How could I reduce latency? Why is the screen of the Fujifilm x-t3 been able to show the image with 0 milliseconds of latency but there is too latency to my computer screen?

This is my basic code:

```<code>#include <opencv2/opencv.hpp>
#include <iostream>

using namespace std;
using namespace cv;

void main() {

    // set input video
    VideoCapture cap(2);

    Mat frame;

    for (;;) {

        // get frame from the video
        cap >> frame;

        // stop the program if no more images
        if (frame.rows == 0 || frame.cols == 0)
            break;

        // show image
        imshow("Fujifilm x-t3 stream", frame);

        //quit on ESC button
        if (waitKey(1) == 27)break;
    }

    return 0;

}

</code>```

Title: Camera to computer high latency

Body:
I am connecting a Fujifilm x-t3 to my computer (usb-c to usb-c) and getting the video stream using OpenCV and C++ in Visual Studio. The issue is I am getting a latency of 116 milliseconds from the real world to the computer screen. This is too high for my real time project.

As you can see in the picture below, the x-t3 digital screen shows the exact same millisecond than the counter of a smartphone (398ms), but at this moment my computer screen is still showing the millisecond 282ms. 398-282 = 116 milliseconds of latency.

116 milliseconds from Fujifilm x-t3 to my computer screen

I tried with several cameras and 116 milliseconds is the best I got.

I tried using a Macbook Pro 2019 (2.2GHz 6-Core Intel Core i7) and also a HP Elitebook Core i5, and I am getting more or less the same results.

How could I reduce latency? Why is the screen of the Fujifilm x-t3 been able to show the image with 0 milliseconds of latency but there is too latency to my computer screen?

This is my basic code:

#include <opencv2/opencv.hpp>
#include <iostream>

using namespace std;
using namespace cv;

void main() {

    // set input video
    VideoCapture cap(2);

    Mat frame;

    for (;;) {

        // get frame from the video
        cap >> frame;

        // stop the program if no more images
        if (frame.rows == 0 || frame.cols == 0)
            break;

        // show image
        imshow("Fujifilm x-t3 stream", frame);

        //quit on ESC button
        if (waitKey(1) == 27)break;
    }

    return 0;

}


问:
VMD write dcd as pdb for any number of frames
I am trying to save a dcd file into a pdb file with VMD. I will be using this .tcl file for several dcd files with different numbers of frames, so I want to make a variable n_frames for the total number of frames, to write the pdb beginning at 0 and ending at n_frames. Please refer below to my efforts.

```<code>set id [mol new "file.psf"]
mol addfile "file.dcd" waitfor all molid $id;
set n_frames [molinfo $id get numframes]
puts "There are $n_frames frames"
animate write pdb file.pdb beg 0 end $n_frames skip 100 0
exit
</code>```

This piece of code works fine if I change $n_frames from the second to last line for any number, for example 100. e.g. animate write pdb file.pdb beg 0 end 100 skip 100 0 works perfectly.

Is there a way I can pass a variable for the end number of frame to achieve this?

I appreciate any guidance. Thanks.

Body:
I am trying to save a dcd file into a pdb file with VMD. I will be using this .tcl file for several dcd files with different numbers of frames, so I want to make a variable n_frames for the total number of frames, to write the pdb beginning at 0 and ending at n_frames. Please refer below to my efforts.

set id [mol new "file.psf"]
mol addfile "file.dcd" waitfor all molid $id;
set n_frames [molinfo $id get numframes]
puts "There are $n_frames frames"
animate write pdb file.pdb beg 0 end $n_frames skip 100 0
exit

This piece of code works fine if I change $n_frames from the second to last line for any number, for example 100. e.g. animate write pdb file.pdb beg 0 end 100 skip 100 0 works perfectly.

Is there a way I can pass a variable for the end number of frame to achieve this?

I appreciate any guidance. Thanks.


问:
Implicit wait not working till the app loads when running from circleCI pipeline
I am trying to run automated tests on android in circleCI.  Looking at the logs and screenshots, looks like the app hasn't completely loaded by then the script starts executing. Its looking for login screen while its still in the splash screen.
I added newCommandTimeout: 1000 , implicitlyWait: 300 to desired capabilities. But looking at the log it is completely ignoring the wait.

```<code>Looking for ways to add implicit wait...

appium: [HTTP] <-- GET /wd/hub/session/6649333d-c650-45c7-b4d0-59b906e4627a 200 13 ms - 1155

appium: [HTTP]

appium: [HTTP] --> POST /wd/hub/session/6649333d-c650-45c7-b4d0-59b906e4627a/timeouts

appium: [HTTP] {"implicit":0}

appium: [debug] [W3C (6649333d)] Calling AppiumDriver.timeouts() with args: [null,null,null,null,0,"6649333d-c650-45c7-b4d0-59b906e4627a"]

appium: [debug] [BaseDriver] W3C timeout argument: {"implicit":0}}

appium: [debug] [BaseDriver] Set implicit wait to 0ms

appium: [debug] [W3C (6649333d)] Responding to client with driver.timeouts() result: null

appium: [HTTP] <-- POST /wd/hub/session/6649333d-c650-45c7-b4d0-59b906e4627a/timeouts 200 6 ms - 14
[HTTP]
`
</code>```

I added newCommandTimeout: 1000 , implicitlyWait: 300 to desired capabilities. But looking at the log it is completely ignoring the wait.

```<code>Looking for ways to add implicit wait...
appium: [HTTP] <-- GET /wd/hub/session/6649333d-c650-45c7-b4d0-59b906e4627a 200 13 ms - 1155

appium: [HTTP]

appium: [HTTP] --> POST /wd/hub/session/6649333d-c650-45c7-b4d0-59b906e4627a/timeouts

appium: [HTTP] {"implicit":0}

appium: [debug] [W3C (6649333d)] Calling AppiumDriver.timeouts() with args: [null,null,null,null,0,"6649333d-c650-45c7-b4d0-59b906e4627a"]

appium: [debug] [BaseDriver] W3C timeout argument: {"implicit":0}}

appium: [debug] [BaseDriver] Set implicit wait to 0ms

appium: [debug] [W3C (6649333d)] Responding to client with driver.timeouts() result: null

appium: [HTTP] <-- POST /wd/hub/session/6649333d-c650-45c7-b4d0-59b906e4627a/timeouts 200 6 ms - 14
[HTTP]
</code>```

Body:
I am trying to run automated tests on android in circleCI.  Looking at the logs and screenshots, looks like the app hasn't completely loaded by then the script starts executing. Its looking for login screen while its still in the splash screen.
I added newCommandTimeout: 1000 , implicitlyWait: 300 to desired capabilities. But looking at the log it is completely ignoring the wait.

Looking for ways to add implicit wait...

appium: [HTTP] <-- GET /wd/hub/session/6649333d-c650-45c7-b4d0-59b906e4627a 200 13 ms - 1155

appium: [HTTP]

appium: [HTTP] --> POST /wd/hub/session/6649333d-c650-45c7-b4d0-59b906e4627a/timeouts

appium: [HTTP] {"implicit":0}

appium: [debug] [W3C (6649333d)] Calling AppiumDriver.timeouts() with args: [null,null,null,null,0,"6649333d-c650-45c7-b4d0-59b906e4627a"]

appium: [debug] [BaseDriver] W3C timeout argument: {"implicit":0}}

appium: [debug] [BaseDriver] Set implicit wait to 0ms

appium: [debug] [W3C (6649333d)] Responding to client with driver.timeouts() result: null

appium: [HTTP] <-- POST /wd/hub/session/6649333d-c650-45c7-b4d0-59b906e4627a/timeouts 200 6 ms - 14
[HTTP]
`

I added newCommandTimeout: 1000 , implicitlyWait: 300 to desired capabilities. But looking at the log it is completely ignoring the wait.

Looking for ways to add implicit wait...
appium: [HTTP] <-- GET /wd/hub/session/6649333d-c650-45c7-b4d0-59b906e4627a 200 13 ms - 1155

appium: [HTTP]

appium: [HTTP] --> POST /wd/hub/session/6649333d-c650-45c7-b4d0-59b906e4627a/timeouts

appium: [HTTP] {"implicit":0}

appium: [debug] [W3C (6649333d)] Calling AppiumDriver.timeouts() with args: [null,null,null,null,0,"6649333d-c650-45c7-b4d0-59b906e4627a"]

appium: [debug] [BaseDriver] W3C timeout argument: {"implicit":0}}

appium: [debug] [BaseDriver] Set implicit wait to 0ms

appium: [debug] [W3C (6649333d)] Responding to client with driver.timeouts() result: null

appium: [HTTP] <-- POST /wd/hub/session/6649333d-c650-45c7-b4d0-59b906e4627a/timeouts 200 6 ms - 14
[HTTP]


问:
Subscripted generics cannot be used with class and instance checks
I'm running into an error when trying to post a menu into my restaurant object using my create_menu_for_restaurant route.

```<code>Subscripted generics cannot be used with class and instance checks
</code>```
```<code>def create_menu_for_restaurant(restaurant_id):
    """Creates and inserts new menu into restaurant database"""
    data = request.get_json()

    # input validation
    try:
         menu = Menu(**data).as_dict()
    except Exception as e:
         return make_response({"message": f"Incorrect data format {e}"}, 400)
    else:
        # update restaurant with new menu
        result = restaurants_collection.update_one({
             {"_id": restaurant_id},
             {"$push": {"menu": menu}}
            })
        # retrieve assigned id by db to new menu
        menu_id = result.inserted_id

        return make_response({
            'message': 'new menu succesfully entered into database',
            'data': {"id": menu_id, **menu}}), 200
</code>```

This is what my restaurant and menu classes look like

```<code>@dataclass()
class Restaurant(EnforcedTypeClass):
    name : str
    address : str
    phone_number : str
    email : str
    hours_of_operation : str
    menu : Union[Menu, None] = None

    def as_dict(self):
        return {
                'name' : self.name,
                'address' : self.address,
                'phone_number' : self.phone_number,
                'email' : self.email,
                'hours_of_operation' : self.hours_of_operation,
                'menu' : self.menu
        }

@dataclass()
class Menu(EnforcedTypeClass):
    restaurant_name : str
    address : str
    postnote : str
    sections : List[Section]

    def as_dict(self):
        return {
            'restaurant_name' : self.restaurant_name,
            'address': self.address,
            'postnote': self.postnote,
            'sections': self.sections
        }
</code>```

I think the issue may lie somewhere in my type_validator.py

```<code>@dataclass()
class EnforcedTypeClass:
    def __post_init__(self):
        for (name, field_type) in self.__annotations__.items():
            if not isinstance(self.__dict__[name], field_type):
                current_type = type(self.__dict__[name])
                raise TypeError(f"The field `{name}` was assigned by `{current_type}` instead of `{field_type}`")
</code>```

I've tried passing through into the validator as a dictionary and keep running into the same issue. Any guidance is appreciated.

Body:
I'm running into an error when trying to post a menu into my restaurant object using my create_menu_for_restaurant route.

Subscripted generics cannot be used with class and instance checks

def create_menu_for_restaurant(restaurant_id):
    """Creates and inserts new menu into restaurant database"""
    data = request.get_json()

    # input validation
    try:
         menu = Menu(**data).as_dict()
    except Exception as e:
         return make_response({"message": f"Incorrect data format {e}"}, 400)
    else:
        # update restaurant with new menu
        result = restaurants_collection.update_one({
             {"_id": restaurant_id},
             {"$push": {"menu": menu}}
            })
        # retrieve assigned id by db to new menu
        menu_id = result.inserted_id

        return make_response({
            'message': 'new menu succesfully entered into database',
            'data': {"id": menu_id, **menu}}), 200

This is what my restaurant and menu classes look like

@dataclass()
class Restaurant(EnforcedTypeClass):
    name : str
    address : str
    phone_number : str
    email : str
    hours_of_operation : str
    menu : Union[Menu, None] = None

    def as_dict(self):
        return {
                'name' : self.name,
                'address' : self.address,
                'phone_number' : self.phone_number,
                'email' : self.email,
                'hours_of_operation' : self.hours_of_operation,
                'menu' : self.menu
        }

@dataclass()
class Menu(EnforcedTypeClass):
    restaurant_name : str
    address : str
    postnote : str
    sections : List[Section]

    def as_dict(self):
        return {
            'restaurant_name' : self.restaurant_name,
            'address': self.address,
            'postnote': self.postnote,
            'sections': self.sections
        }

I think the issue may lie somewhere in my type_validator.py

@dataclass()
class EnforcedTypeClass:
    def __post_init__(self):
        for (name, field_type) in self.__annotations__.items():
            if not isinstance(self.__dict__[name], field_type):
                current_type = type(self.__dict__[name])
                raise TypeError(f"The field `{name}` was assigned by `{current_type}` instead of `{field_type}`")

I've tried passing through into the validator as a dictionary and keep running into the same issue. Any guidance is appreciated.


问:
Microsoft.Extensions.Configuration.Json missing Manage Nuget Packages
I'm just trying to access appsettings.json using following article

https://makolyte.com/csharp-when-setbasepath-and-addjsonfile-are-missing-for-configurationbuilder/

However, when I try to browse Microsoft.Extensions.Configuration.Json it's not there. I can using Install-Package to get it though.

Can someone share some insight as to why this is?


问:
What css property is used to remove the gap above and below the meter element?
I'm trying to remove this whitespace above and below the meter-bar, but can't determine what property I need to override from the User Agent Stylesheet.

```<code>/* meter */
meter {
    -webkit-appearance: meter;
    box-sizing: border-box;
    display: inline-block;
    height: 1em;
    width: 5em;
    vertical-align: -0.2em;
}
meter::-webkit-meter-inner-element {
    -webkit-appearance: inherit;
    box-sizing: inherit;
    -webkit-user-modify: read-only !important;
    height: 100%;
    width: 100%;
}
meter::-webkit-meter-bar {
    background: linear-gradient(to bottom, #ddd, #eee 20%, #ccc 45%, #ccc 55%, #ddd);
    height: 100%;
    width: 100%;
    -webkit-user-modify: read-only !important;
    box-sizing: border-box;
}
meter::-webkit-meter-optimum-value {
    background: linear-gradient(to bottom, #ad7, #cea 20%, #7a3 45%, #7a3 55%, #ad7);
    height: 100%;
    -webkit-user-modify: read-only !important;
    box-sizing: border-box;
}
meter::-webkit-meter-suboptimum-value {
    background: linear-gradient(to bottom, #fe7, #ffc 20%, #db3 45%, #db3 55%, #fe7);
    height: 100%;
    -webkit-user-modify: read-only !important;
    box-sizing: border-box;
}
meter::-webkit-meter-even-less-good-value {
    background: linear-gradient(to bottom, #f77, #fcc 20%, #d44 45%, #d44 55%, #f77);
    height: 100%;
    -webkit-user-modify: read-only !important;
    box-sizing: border-box;
}
</code>```

I tried padding, border, and border-box, but to no avail.

Body:
I'm trying to remove this whitespace above and below the meter-bar, but can't determine what property I need to override from the User Agent Stylesheet.

/* meter */
meter {
    -webkit-appearance: meter;
    box-sizing: border-box;
    display: inline-block;
    height: 1em;
    width: 5em;
    vertical-align: -0.2em;
}
meter::-webkit-meter-inner-element {
    -webkit-appearance: inherit;
    box-sizing: inherit;
    -webkit-user-modify: read-only !important;
    height: 100%;
    width: 100%;
}
meter::-webkit-meter-bar {
    background: linear-gradient(to bottom, #ddd, #eee 20%, #ccc 45%, #ccc 55%, #ddd);
    height: 100%;
    width: 100%;
    -webkit-user-modify: read-only !important;
    box-sizing: border-box;
}
meter::-webkit-meter-optimum-value {
    background: linear-gradient(to bottom, #ad7, #cea 20%, #7a3 45%, #7a3 55%, #ad7);
    height: 100%;
    -webkit-user-modify: read-only !important;
    box-sizing: border-box;
}
meter::-webkit-meter-suboptimum-value {
    background: linear-gradient(to bottom, #fe7, #ffc 20%, #db3 45%, #db3 55%, #fe7);
    height: 100%;
    -webkit-user-modify: read-only !important;
    box-sizing: border-box;
}
meter::-webkit-meter-even-less-good-value {
    background: linear-gradient(to bottom, #f77, #fcc 20%, #d44 45%, #d44 55%, #f77);
    height: 100%;
    -webkit-user-modify: read-only !important;
    box-sizing: border-box;
}

I tried padding, border, and border-box, but to no avail.


问:
Using a locally downloaded file to execute nltk.download('stopwords')
I get an error ("urlopen error [WinError 10060]") if I do:

```<code>import nltk
nltk.download('stopwords')
</code>```

So I went to http://www.nltk.org/nltk_data/ and downloaded stopwords.zip and placed this file to C:\conda\nltk_data where C:\conda is where my miniconda's installation folder.

However,

```<code>import nltk
nltk.download('stopwords', download_dir = 'C:/conda/nltk_data')
</code>```

produces the same error. How can I overcome this? Thanks.

Body:
I get an error ("urlopen error [WinError 10060]") if I do:

import nltk
nltk.download('stopwords')

So I went to http://www.nltk.org/nltk_data/ and downloaded stopwords.zip and placed this file to C:\conda\nltk_data where C:\conda is where my miniconda's installation folder.

However,

import nltk
nltk.download('stopwords', download_dir = 'C:/conda/nltk_data')

produces the same error. How can I overcome this? Thanks.


问:
Leaflet / Alpinejs / all markers (layer) position change on zoom after using categories filters
You will find my code below.

I have a map with category filters. The map initialize and display correctly but when I use the filter (and the filterMarkers function), the markers change but when I zoom or use the map, the whole "layer" position stays kind of "fixed" and markers position are wrong.

Do I do something wrong? Do I need to reinit the map on category change? Also I'm working with a class system, I'm probably missing something.

Thank you in advance!

```<code>import { createComponent } from '../utils/alpine'
import L from 'leaflet'

export default createComponent(({ $persist, $defaults }) => ({

    map: null,
    data: null,

    setup () {

        this.map = L.map('map').setView([42.284095, 9.108869], 9)

        L.tileLayer('https://{s}.basemaps.cartocdn.com/rastertiles/voyager_labels_under/{z}/{x}/{y}{r}.png', {
            attribution: 'données © OpenStreetMap/ODbL - rendu OSM France',
            minZoom: 1,
            maxZoom: 20
        }).addTo(this.map)

        const request = new XMLHttpRequest()

        request.open('GET', '/api/markers/map-1')
        request.responseType = 'json'
        request.send()
        request.onload = function() {
            this.data = request.response
            this.addAllLayers()
        }.bind(this)

    },

    addSelectedLayer (category) {
        const autoLayer = L.geoJson(this.data, {
            filter: function (feature, layer) {
                return feature.properties.ca === category
            },
            pointToLayer: function (feature, latlng) {

                const title = feature.properties.ti
                const link = feature.properties.li
                const image = feature.properties.im
                const description = feature.properties.de
                const category = feature.properties.ca

                const categoryIcon = {
                    cat1: {color: 'bg-brown', size: 'w-[16px] h-[16px]', icon: 'i-[castle]'},
                    cat2: {color: 'bg-valid', size: 'w-[17px] h-[17px]', icon: 'i-[hiking]'},
                    cat3: {color: 'bg-orange', size: 'w-[16px] h-[16px]', icon: 'i-[eating]'},
                    cat4: {color: 'bg-danube', size: 'w-[18px] h-[18px]', icon: 'i-[swimming]'},
                    cat5: {color: 'bg-yellow-dark', size: 'w-[19px] h-[19px]', icon: 'i-[leasure]'},
                };

                const categoryIconHtml = '<span class="' + categoryIcon[category].color + ' w-8 h-8 rounded-full block relative"><i class="' + categoryIcon[category].size + ' ' + categoryIcon[category].icon + ' text-white absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"></i><span class="' + categoryIcon[category].color + ' block absolute -bottom-1 left-1/2 -translate-x-1/2 -translate-y-[1px] rotate-45 h-2 w-2"></span></span>'

                let popupContent = ''
                popupContent = '<div class="flex bg-white rounded-xl overflow-hidden w-[600px]"><div class="w-1/2 h-48 relative"><img class="absolute inset-0 h-full w-full object-cover" src="' + image + '" /></div><div class="w-1/2 p-4"><span class="text-base font-semibold">' + title + '</span><span class="block mt-1 text-base">' + description + '</span><span>' + link + '</span></div></div>'

                return L.marker(latlng, {
                    category: category,
                    title: title,
                    icon: L.divIcon({ html: categoryIconHtml, iconSize: [24,36], iconAnchor: [12,36] })
                }).bindPopup(popupContent)

            }
        })
        autoLayer.addTo(this.map)
    },

    addAllLayers () {
        this.clearLayers()
        for (let i = 1; i < 6; i++) {
            this.addSelectedLayer('cat' + i)
        }
    },

    clearLayers () {
        this.map.eachLayer(function (layer) {
            if (typeof layer._url === 'undefined') {
                this.map.removeLayer(layer)
            }
        }.bind(this))
    },

    filterMarkers(category) {
        if (category === 'all') {
            this.addAllLayers()
        } else {
            this.clearLayers()
            this.addSelectedLayer(category)
        }
    },

}))
</code>```

Body:
You will find my code below.

I have a map with category filters. The map initialize and display correctly but when I use the filter (and the filterMarkers function), the markers change but when I zoom or use the map, the whole "layer" position stays kind of "fixed" and markers position are wrong.

Do I do something wrong? Do I need to reinit the map on category change? Also I'm working with a class system, I'm probably missing something.

Thank you in advance!

import { createComponent } from '../utils/alpine'
import L from 'leaflet'

export default createComponent(({ $persist, $defaults }) => ({

    map: null,
    data: null,

    setup () {

        this.map = L.map('map').setView([42.284095, 9.108869], 9)

        L.tileLayer('https://{s}.basemaps.cartocdn.com/rastertiles/voyager_labels_under/{z}/{x}/{y}{r}.png', {
            attribution: 'données © OpenStreetMap/ODbL - rendu OSM France',
            minZoom: 1,
            maxZoom: 20
        }).addTo(this.map)

        const request = new XMLHttpRequest()

        request.open('GET', '/api/markers/map-1')
        request.responseType = 'json'
        request.send()
        request.onload = function() {
            this.data = request.response
            this.addAllLayers()
        }.bind(this)

    },

    addSelectedLayer (category) {
        const autoLayer = L.geoJson(this.data, {
            filter: function (feature, layer) {
                return feature.properties.ca === category
            },
            pointToLayer: function (feature, latlng) {

                const title = feature.properties.ti
                const link = feature.properties.li
                const image = feature.properties.im
                const description = feature.properties.de
                const category = feature.properties.ca

                const categoryIcon = {
                    cat1: {color: 'bg-brown', size: 'w-[16px] h-[16px]', icon: 'i-[castle]'},
                    cat2: {color: 'bg-valid', size: 'w-[17px] h-[17px]', icon: 'i-[hiking]'},
                    cat3: {color: 'bg-orange', size: 'w-[16px] h-[16px]', icon: 'i-[eating]'},
                    cat4: {color: 'bg-danube', size: 'w-[18px] h-[18px]', icon: 'i-[swimming]'},
                    cat5: {color: 'bg-yellow-dark', size: 'w-[19px] h-[19px]', icon: 'i-[leasure]'},
                };

                const categoryIconHtml = ''

                let popupContent = ''
                popupContent = '

' + title + '' + description + '' + link + '

'

                return L.marker(latlng, {
                    category: category,
                    title: title,
                    icon: L.divIcon({ html: categoryIconHtml, iconSize: [24,36], iconAnchor: [12,36] })
                }).bindPopup(popupContent)

            }
        })
        autoLayer.addTo(this.map)
    },

    addAllLayers () {
        this.clearLayers()
        for (let i = 1; i < 6; i++) {
            this.addSelectedLayer('cat' + i)
        }
    },

    clearLayers () {
        this.map.eachLayer(function (layer) {
            if (typeof layer._url === 'undefined') {
                this.map.removeLayer(layer)
            }
        }.bind(this))
    },

    filterMarkers(category) {
        if (category === 'all') {
            this.addAllLayers()
        } else {
            this.clearLayers()
            this.addSelectedLayer(category)
        }
    },

}))


问:
Find index j in a simple convex vector
A vector V [0, n − 1] is a simple convex vector if a index j exists such that V [0] = V[1] = V[2] = ··· = V[j] and for each i > j, V[i] < V[i + 1]. Can you write pseudocode to solve this in O(log(n)) time complexity?

That's my solution, but I don't know if it works. I think it should but assuming for each i >= j, V[i] < V[i + 1]. I don't know if I have a wrong definition.

```<code>convex(A, l, r) {
  m = floor((l + r) / 2);

  if (A[m] == A[0] && A[m] != A[m + 1] {
    return m;
  }

  if (A[m] == A[0]) {
    return convex(A, m + 1, r);
  }
  else {
    return convex(A, l, m - 1);
  }
}
</code>```

Title: Find index j in a simple convex vector

Body:
A vector V [0, n − 1] is a simple convex vector if a index j exists such that V [0] = V[1] = V[2] = ··· = V[j] and for each i > j, V[i] < V[i + 1]. Can you write pseudocode to solve this in O(log(n)) time complexity?

That's my solution, but I don't know if it works. I think it should but assuming for each i >= j, V[i] < V[i + 1]. I don't know if I have a wrong definition.

convex(A, l, r) {
  m = floor((l + r) / 2);

  if (A[m] == A[0] && A[m] != A[m + 1] {
    return m;
  }

  if (A[m] == A[0]) {
    return convex(A, m + 1, r);
  }
  else {
    return convex(A, l, m - 1);
  }
}


问:
Can someone explain how to write a function so that the Function Transformer from sklearn understands it
I have several functions that need to be sent to pipeline on assignment, for example

```<code>def Android_iOs_device_os_cange(df: pd.DataFrame) -> pd.DataFrame:
    import numpy as np
    df = df.copy()
    def foung_android_list(df):
        list_for_android = list(df[df['device_os'] == 'Android'].device_brand.unique())
        list_for_android.remove('(not set)')
        return list_for_android
    def foung_iOS_list(df):
        list_for_iOS = list(df[df['device_os'] == 'iOS'].device_brand.unique())
        list_for_iOS.remove('(not set)')
        return list_for_iOS

    df.loc[:,'device_os'] = np.where(df.loc[df['device_brand'].isin(foung_iOS_list(df))] & (df.loc[df['device_os'].isnull()]), 'iOS',
                                    df['device_os'])
    df.loc[:,'device_os'] = np.where(df['device_brand'].isin(foung_android_list(df)) & (df['device_os'].isnull()), 'Android',
                               df['device_os'])
    df.loc[:,'device_os'] = np.where(df['device_os'].isnull(), '(not set)', df['device_os'])
    print(df)
    return df
</code>```

This function changes all empty values in the device_os column on Android or iOS, depending on which brand of phone the client has specified, or leaves (not set) if the device_brand line is empty. As a function in jupiter lab, the code runs fine, but when I inserted it into the function in the pipeline, the code gives me an error, 'device_brand', i.e. the code does not find such a column in the DataFrame.

Because this is a data science task, I have a data preprocessing function and I perform it outside of pipline, because a target variable is needed for x and y, and I get it from another dataframe, in theory I can generally shove everything into the preprocessing function and execute the code like this, but the task is a task if I shove Android_iOs_device_os_cange to the preprocessing function, then the from_float_to_int function follows

```<code>def from_float_to_int(df: pd.DataFrame) -> pd.DataFrame:
    df = df.copy()
    for i in df.columns:
        if df[i].dtype == 'float64':
            df[i] = df[i].astype(int)
    print(df)
    return df
</code>```

as it is easy to guess, it changes the data type from float to int, and i have an idea make columnselectior replace types but I am not sure about the correctness of this strategy, at the end there are functions that cannot be replaced so easily.

as it is easy to guess, it changes the data type from float to int and then I encounter the problem that pipeline does not perceive the columns function, and without it I will not be able to perform two probably the most important functions: prepare_for_ohe and make_standard_scatter and Labelencoder_select. The first function removes from all columns, except one, all columns where unique values are less than 80, the second converts numeric values for certain columns to StandartScallaer, and the latter converts encrypted data to LabelEncoder and in all these functions there are pd.columns, without this function I do not know how to replace it, because if with this problem I if I meet in from_float_to_int, then it's stupid to think that it won't be in the following functions

```<code>def make_standard_scatter(df: pd.DataFrame) -> None:
    from sklearn.preprocessing import StandardScaler
    df = df.copy()
    data_1 = df[['count_of_action', 'hit_time']]
    std_scaler = StandardScaler()
    std_scaler.fit(data_1)
    std_scaled = std_scaler.transform(data_1)
    list1 = ['count_of_action', 'hit_time']
    list2 = []
    for name in list1:
        std_name = name + '_std'
        list2.append(std_name)
    df[list2] = std_scaled
    print(df)
    return df
</code>```
```<code>def prepare_for_ohe(df: pd.DataFrame) -> pd.DataFrame:
    df = df.copy()
    df[[i for i in df.columns if i != 'hit_time']] = df[[i for i in df.columns if i != 'hit_time']].apply(
        lambda x: x.where(x.map(x.value_counts()) > 80))
    df = df.dropna()
    return df
</code>```
```<code>def Labelencoder_select(df: pd.DataFrame) -> None:
    from sklearn.preprocessing import LabelEncoder
    df = df.copy()
    list1 = [i for i in df.columns if (i.split('_')[0] in 'utm') or (i.split('_')[0] in 'device') or (i.split('_')[0] in
                                                                                'geo')]
    df[list1] = df[list1].apply(LabelEncoder().fit_transform)
    print(df)
    return df
</code>```

And all this I mean, how to write functions so that pd.columns functions and line-by-line data changes are perceived correctly by Pipeline.

Body:
I have several functions that need to be sent to pipeline on assignment, for example

def Android_iOs_device_os_cange(df: pd.DataFrame) -> pd.DataFrame:
    import numpy as np
    df = df.copy()
    def foung_android_list(df):
        list_for_android = list(df[df['device_os'] == 'Android'].device_brand.unique())
        list_for_android.remove('(not set)')
        return list_for_android
    def foung_iOS_list(df):
        list_for_iOS = list(df[df['device_os'] == 'iOS'].device_brand.unique())
        list_for_iOS.remove('(not set)')
        return list_for_iOS

    df.loc[:,'device_os'] = np.where(df.loc[df['device_brand'].isin(foung_iOS_list(df))] & (df.loc[df['device_os'].isnull()]), 'iOS',
                                    df['device_os'])
    df.loc[:,'device_os'] = np.where(df['device_brand'].isin(foung_android_list(df)) & (df['device_os'].isnull()), 'Android',
                               df['device_os'])
    df.loc[:,'device_os'] = np.where(df['device_os'].isnull(), '(not set)', df['device_os'])
    print(df)
    return df

This function changes all empty values in the device_os column on Android or iOS, depending on which brand of phone the client has specified, or leaves (not set) if the device_brand line is empty. As a function in jupiter lab, the code runs fine, but when I inserted it into the function in the pipeline, the code gives me an error, 'device_brand', i.e. the code does not find such a column in the DataFrame.

Because this is a data science task, I have a data preprocessing function and I perform it outside of pipline, because a target variable is needed for x and y, and I get it from another dataframe, in theory I can generally shove everything into the preprocessing function and execute the code like this, but the task is a task if I shove Android_iOs_device_os_cange to the preprocessing function, then the from_float_to_int function follows

def from_float_to_int(df: pd.DataFrame) -> pd.DataFrame:
    df = df.copy()
    for i in df.columns:
        if df[i].dtype == 'float64':
            df[i] = df[i].astype(int)
    print(df)
    return df

as it is easy to guess, it changes the data type from float to int, and i have an idea make columnselectior replace types but I am not sure about the correctness of this strategy, at the end there are functions that cannot be replaced so easily.

as it is easy to guess, it changes the data type from float to int and then I encounter the problem that pipeline does not perceive the columns function, and without it I will not be able to perform two probably the most important functions: prepare_for_ohe and make_standard_scatter and Labelencoder_select. The first function removes from all columns, except one, all columns where unique values are less than 80, the second converts numeric values for certain columns to StandartScallaer, and the latter converts encrypted data to LabelEncoder and in all these functions there are pd.columns, without this function I do not know how to replace it, because if with this problem I if I meet in from_float_to_int, then it's stupid to think that it won't be in the following functions

def make_standard_scatter(df: pd.DataFrame) -> None:
    from sklearn.preprocessing import StandardScaler
    df = df.copy()
    data_1 = df[['count_of_action', 'hit_time']]
    std_scaler = StandardScaler()
    std_scaler.fit(data_1)
    std_scaled = std_scaler.transform(data_1)
    list1 = ['count_of_action', 'hit_time']
    list2 = []
    for name in list1:
        std_name = name + '_std'
        list2.append(std_name)
    df[list2] = std_scaled
    print(df)
    return df

def prepare_for_ohe(df: pd.DataFrame) -> pd.DataFrame:
    df = df.copy()
    df[[i for i in df.columns if i != 'hit_time']] = df[[i for i in df.columns if i != 'hit_time']].apply(
        lambda x: x.where(x.map(x.value_counts()) > 80))
    df = df.dropna()
    return df

def Labelencoder_select(df: pd.DataFrame) -> None:
    from sklearn.preprocessing import LabelEncoder
    df = df.copy()
    list1 = [i for i in df.columns if (i.split('_')[0] in 'utm') or (i.split('_')[0] in 'device') or (i.split('_')[0] in
                                                                                'geo')]
    df[list1] = df[list1].apply(LabelEncoder().fit_transform)
    print(df)
    return df

And all this I mean, how to write functions so that pd.columns functions and line-by-line data changes are perceived correctly by Pipeline.