问:
How to change Fingerprint in Selenium
I use python selenium.
I have a json file with this such fingerprint:</p>
```<code>{"valid":true,"plugins":[{"ref":1446158656,"description":"Portable Document Format","filename":"internal-pdf-viewer","name":"PDF Viewer","mimes":[-1248334925,-1004735216]},{"ref":1010824838,"description":"Portable Document Format","filename":"internal-pdf-viewer","name":"Chrome PDF Viewer","mimes":[-1248334925,-1004735216]},{"ref":-1972253206,"description":"Portable Document Format","filename":"internal-pdf-viewer","name":"Chromium PDF Viewer","mimes":[-1248334925,-1004735216]},{"ref":-545395695,"description":"Portable Document Format","filename":"internal-pdf-viewer","name":"Microsoft Edge PDF Viewer","mimes":[-1248334925,-1004735216]},{"ref":1114102244,"description":"Portable Document Format","filename":"internal-pdf-viewer","name":"WebKit built-in PDF","mimes":[-1248334925,-1004735216]}],"mimes":[{"ref":-1248334925,"description":"Portable Document Format","suffixes":"pdf","type":"application/pdf","plugin":1446158656},{"ref":-1004735216,"description":"Portable Document Format","suffixes":"pdf","type":"text/pdf","plugin":1446158656}],"ua":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.42","tags":["Microsoft Windows","Chrome","Desktop","Windows 10"],"dnt":false,"width":1553,"height":749,"canvas":"40f509adc22f058c83898e21b6aec78772e7151591b9c93e2fee5e1180d376884de77289249b27f0f74abb765b8992bca96f28b29bb02c7a309fa718357d3e0d7f83837f837b7c7b7f7e817f7b7b7b7f827c827f827e7b7b7e7c7c7e7e7f7d817b7b81807f80827c7f7b7e837e7e838182827d","webgl":"d3ac117c2e17e9bb6723d9b9676db7d5b9b30cdea3490ae18bc00c49dc04f5015ea71a57b75f4e78048e072f5f107e5e4bfc394c4bf21807b36cfa417deec8067f83837f837b7c7b7f7e817f7b7b7b7f827c827f827e7b7b7e7c7c7e7e7f7d817b7b81807f80827c7f7b7e837e7e838182827d","rectangles":"98ab352f2b85f83343fb33aa75273943d98d27f7cc6bd8f74572b47d63b6e3c53ee99b02d426fac0d50a4dafbf6f51f7d9ed54ba954a93f735d1d2e86e12d605b6ff0100a8bc0600dc3affff1f75ffffd73bfaffb72e05000aeafaffd349faffe1ce0600eb1efeff3a96feff521dfdff08f000001226fbffcc9f020029b505005cccf8ffdecefdffe5e60000402d0300c6aa0000101b0300654efbff8d8afafff9eff9ffa3bcfdffcb6dfeff4bd9feff64dbffffe2bb0200bb110500106c0300a2cd020070e30600710802004b560200321c0200cb3e07009849faff6ba9fdff34c4fbff5847fcff63170300b93df9ffcae9ffffbc97f8ff9f0e0000a7a3f8ff55dc04006ccd0600c043faffb0b5ffff33ecf8ffabbdfcff4252060093080600c383fcffe670f8ffb22604003de6ffff5c6e060086bf0100c2b0fdff862efdff633e1e0e203e1e0e203e1e0e203e1e0e633e1e0e","audio":"f89e8f36583094aecdc796a9768960336dfb6ff317c44bd3f451bc9e7a06419f401a175af59c4c243f891e2d8e4251656e9547194e1c5d85269bb67c46fece04927f8d6d937c6e74828390827e867480836e6b8f8782727873758a8f90848c7e738079937085818a80917a8090786d8c7f6b876f8f7a72798b788b7c7382938593866b856e92926c70898b90868687817f8092918c8b7d91887190718a70818282807286","battery":"aa807911c85f1ba1e96a7060b553c52c356c8308d50a2947918379a376c1bd3a6b47944e4820b463abd7b66f8edd8cfd9b3ce8d91d972c305a0be3e4fa9b940009995a21310d51","has_battery_api":true,"has_battery_device":false,"webgl_properties":{"unmaskedVendor":"Google Inc. (NVIDIA)","unmaskedRenderer":"ANGLE (NVIDIA, NVIDIA GeForce GTX 1070 Direct3D11 vs_5_0 ps_5_0, D3D11)","vendor":"WebKit","renderer":"WebKit WebGL","shadingLanguage":"WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)","version":"WebGL 1.0 (OpenGL ES 2.0 Chromium)","maxAnisotropy":"16","shadingLanguage2":"WebGL GLSL ES 3.00 (OpenGL ES GLSL ES 3.0 Chromium)","version2":"WebGL 2.0 (OpenGL ES 3.0 Chromium)","aliasedLineWidthRange":{"0":1,"1":1},"aliasedPointSizeRange":{"0":1,"1":1024},"alphaBits":"8","blueBits":"8","depthBits":"24","greenBits":"8","maxCombinedTextureImageUnits":"32","maxCubeMapTextureSize":"16384","maxFragmentUniformVectors":"1024","maxRenderBufferSize":"16384","maxTextureImageUnits":"16","maxTextureSize":"16384","maxVaryingVectors":"30","maxVertexAttribs":"16","maxVertexTextureImageUnits":"16","maxVertexUniformVectors":"4095","maxViewportDims":{"0":32767,"1":32767},"redBits":"8","stencilBits":"8","subpixelBits":"4","sampleBuffers":"1","samples":"4","stencilBackValueMask":"2147483647","stencilBackWritemask":"2147483647","stencilValueMask":"2147483647","stencilWritemask":"2147483647","maxColorAttachmentsWebgl":"8","maxDrawBuffersWebgl":"8","webglContextAttributesDefaults":{"alpha":true,"antialias":true,"depth":true,"desynchronized":false,"failIfMajorPerformanceCaveat":false,"powerPreference":"default","premultipliedAlpha":true,"preserveDrawingBuffer":false,"stencil":false,"xrCompatible":false},"extensions":"ANGLE_instanced_arrays,EXT_blend_minmax,EXT_color_buffer_half_float,EXT_disjoint_timer_query,EXT_float_blend,EXT_frag_depth,EXT_shader_texture_lod,EXT_texture_compression_bptc,EXT_texture_compression_rgtc,EXT_texture_filter_anisotropic,EXT_sRGB,KHR_parallel_shader_compile,OES_element_index_uint,OES_fbo_render_mipmap,OES_standard_derivatives,OES_texture_float,OES_texture_float_linear,OES_texture_half_float,OES_texture_half_float_linear,OES_vertex_array_object,WEBGL_color_buffer_float,WEBGL_compressed_texture_s3tc,WEBGL_compressed_texture_s3tc_srgb,WEBGL_debug_renderer_info,WEBGL_debug_shaders,WEBGL_depth_texture,WEBGL_draw_buffers,WEBGL_lose_context,WEBGL_multi_draw","precisionVertexShaderHighFloat":23,"rangeMinVertexShaderHighFloat":127,"rangeMaxVertexShaderHighFloat":127,"precisionVertexShaderMediumFloat":23,"rangeMinVertexShaderMediumFloat":127,"rangeMaxVertexShaderMediumFloat":127,"precisionVertexShaderLowFloat":23,"rangeMinVertexShaderLowFloat":127,"rangeMaxVertexShaderLowFloat":127,"precisionFragmentShaderHighFloat":23,"rangeMinFragmentShaderHighFloat":127,"rangeMaxFragmentShaderHighFloat":127,"precisionFragmentShaderMediumFloat":23,"rangeMinFragmentShaderMediumFloat":127,"rangeMaxFragmentShaderMediumFloat":127,"precisionFragmentShaderLowFloat":23,"rangeMinFragmentShaderLowFloat":127,"rangeMaxFragmentShaderLowFloat":127,"precisionVertexShaderHighInt":0,"rangeMinVertexShaderHighInt":31,"rangeMaxVertexShaderHighInt":30,"precisionVertexShaderMediumInt":0,"rangeMinVertexShaderMediumInt":31,"rangeMaxVertexShaderMediumInt":30,"precisionVertexShaderLowInt":0,"rangeMinVertexShaderLowInt":31,"rangeMaxVertexShaderLowInt":30,"precisionFragmentShaderHighInt":0,"rangeMinFragmentShaderHighInt":31,"rangeMaxFragmentShaderHighInt":30,"precisionFragmentShaderMediumInt":0,"rangeMinFragmentShaderMediumInt":31,"rangeMaxFragmentShaderMediumInt":30,"precisionFragmentShaderLowInt":0,"rangeMinFragmentShaderLowInt":31,"rangeMaxFragmentShaderLowInt":30,"maxVertexUniformComponents2":"16380","maxVertexUniformBlocks2":"12","maxVertexOutputComponents2":"120","maxVaryingComponents2":"120","maxTransformFeedbackInterleavedComponents2":"120","maxTransformFeedbackSeparateAttribs2":"4","maxTransformFeedbackSeparateComponents2":"4","maxFragmentUniformComponents2":"4096","maxFragmentUniformBlocks2":"12","maxFragmentInputComponents2":"120","minProgramTexelOffset2":"-8","maxProgramTexelOffset2":"7","maxDrawBuffers2":"8","maxColorAttachments2":"8","maxSamples2":"8","max3DTextureSize2":"2048","maxArrayTextureLayers2":"2048","maxClientWaitTimeoutWebgl2":"0","maxElementIndex2":"4294967294","maxServerWaitTimeout2":"0","stencilBackValueMask2":"2147483647","stencilBackWritemask2":"2147483647","stencilValueMask2":"2147483647","stencilWritemask2":"2147483647","maxTextureLodBias2":"2","maxUniformBufferBindings2":"24","maxUniformBlockSize2":"65536","uniformBufferOffsetAlignment2":"256","maxCombinedUniformBlocks2":"24","maxCombinedVertexUniformComponents2":"212988","maxCombinedFragmentUniformComponents2":"200704","maxElementsVertices2":"2147483647","maxElementsIndices2":"2147483647","aliasedLineWidthRange2":{"0":1,"1":1},"aliasedPointSizeRange2":{"0":1,"1":1024},"webglContextAttributesDefaults2":{"alpha":true,"antialias":true,"depth":true,"desynchronized":false,"failIfMajorPerformanceCaveat":false,"powerPreference":"default","premultipliedAlpha":true,"preserveDrawingBuffer":false,"stencil":false,"xrCompatible":false},"alphaBits2":"8","blueBits2":"8","depthBits2":"24","greenBits2":"8","maxCombinedTextureImageUnits2":"32","maxCubeMapTextureSize2":"16384","maxFragmentUniformVectors2":"1024","maxRenderBufferSize2":"16384","maxTextureImageUnits2":"16","maxTextureSize2":"16384","maxVaryingVectors2":"30","maxVertexAttribs2":"16","maxVertexTextureImageUnits2":"16","maxVertexUniformVectors2":"4095","maxViewportDims2":{"0":32767,"1":32767},"redBits2":"8","stencilBits2":"8","subpixelBits2":"4","sampleBuffers2":"1","samples2":"4","extensions2":"EXT_color_buffer_float,EXT_color_buffer_half_float,EXT_disjoint_timer_query_webgl2,EXT_float_blend,EXT_texture_compression_bptc,EXT_texture_compression_rgtc,EXT_texture_filter_anisotropic,EXT_texture_norm16,KHR_parallel_shader_compile,OES_draw_buffers_indexed,OES_texture_float_linear,WEBGL_compressed_texture_s3tc,WEBGL_compressed_texture_s3tc_srgb,WEBGL_debug_renderer_info,WEBGL_debug_shaders,WEBGL_lose_context,WEBGL_multi_draw,OVR_multiview2","precisionVertexShaderHighFloat2":23,"rangeMinVertexShaderHighFloat2":127,"rangeMaxVertexShaderHighFloat2":127,"precisionVertexShaderMediumFloat2":23,"rangeMinVertexShaderMediumFloat2":127,"rangeMaxVertexShaderMediumFloat2":127,"precisionVertexShaderLowFloat2":23,"rangeMinVertexShaderLowFloat2":127,"rangeMaxVertexShaderLowFloat2":127,"precisionFragmentShaderHighFloat2":23,"rangeMinFragmentShaderHighFloat2":127,"rangeMaxFragmentShaderHighFloat2":127,"precisionFragmentShaderMediumFloat2":23,"rangeMinFragmentShaderMediumFloat2":127,"rangeMaxFragmentShaderMediumFloat2":127,"precisionFragmentShaderLowFloat2":23,"rangeMinFragmentShaderLowFloat2":127,"rangeMaxFragmentShaderLowFloat2":127,"precisionVertexShaderHighInt2":0,"rangeMinVertexShaderHighInt2":31,"rangeMaxVertexShaderHighInt2":30,"precisionVertexShaderMediumInt2":0,"rangeMinVertexShaderMediumInt2":31,"rangeMaxVertexShaderMediumInt2":30,"precisionVertexShaderLowInt2":0,"rangeMinVertexShaderLowInt2":31,"rangeMaxVertexShaderLowInt2":30,"precisionFragmentShaderHighInt2":0,"rangeMinFragmentShaderHighInt2":31,"rangeMaxFragmentShaderHighInt2":30,"precisionFragmentShaderMediumInt2":0,"rangeMinFragmentShaderMediumInt2":31,"rangeMaxFragmentShaderMediumInt2":30,"precisionFragmentShaderLowInt2":0,"rangeMinFragmentShaderLowInt2":31,"rangeMaxFragmentShaderLowInt2":30},"audio_properties":{"BaseAudioContextSampleRate":48000,"AudioContextBaseLatency":0.01,"AudioContextOutputLatency":0,"AudioDestinationNodeMaxChannelCount":2,"AnalyzerNodeFftSize":2048,"AnalyzerNodeFrequencyBinCount":1024,"AnalyzerNodeMinDecibels":-100,"AnalyzerNodeMaxDecibels":-30,"AnalyzerNodeSmoothingTimeConstant":0.8,"BiquadFilterNodeFrequencyDefaultValue":350,"BiquadFilterNodeFrequencyMaxValue":24000,"BiquadFilterNodeFrequencyMinValue":0,"BiquadFilterNodeDetuneDefaultValue":0,"BiquadFilterNodeDetuneMaxValue":153600,"BiquadFilterNodeDetuneMinValue":-153600,"BiquadFilterNodeQDefaultValue":1,"BiquadFilterNodeQMaxValue":3.4028234663852886e+38,"BiquadFilterNodeQMinValue":-3.4028234663852886e+38,"BiquadFilterNodeGainDefaultValue":0,"BiquadFilterNodeGainMaxValue":1541.273681640625,"BiquadFilterNodeGainMinValue":-3.4028234663852886e+38,"BiquadFilterNodeType":"lowpass","AudioBufferSourceNodeDetuneDefaultValue":0,"AudioBufferSourceNodeDetuneMaxValue":3.4028234663852886e+38,"AudioBufferSourceNodeDetuneMinValue":-3.4028234663852886e+38,"AudioBufferSourceNodePlaybackRateDefaultValue":1,"AudioBufferSourceNodePlaybackRateMaxValue":3.4028234663852886e+38,"AudioBufferSourceNodePlaybackRateMinValue":-3.4028234663852886e+38,"ConstantSourceNodeOffsetDefaultValue":1,"ConstantSourceNodeOffsetMaxValue":3.4028234663852886e+38,"ConstantSourceNodeOffsetMinValue":-3.4028234663852886e+38,"DelayNodeDelayTimeDefaultValue":0,"DelayNodeDelayTimeMaxValue":1,"DelayNodeDelayTimeMinValue":0,"DynamicsCompressorNodeThresholdDefaultValue":-24,"DynamicsCompressorNodeThresholdMaxValue":0,"DynamicsCompressorNodeThresholdMinValue":-100,"DynamicsCompressorNodeKneeDefaultValue":30,"DynamicsCompressorNodeKneeMaxValue":40,"DynamicsCompressorNodeKneeMinValue":0,"DynamicsCompressorNodeRatioDefaultValue":12,"DynamicsCompressorNodeRatioMaxValue":20,"DynamicsCompressorNodeRatioMinValue":1,"DynamicsCompressorNodeReduction":0,"DynamicsCompressorNodeAttackDefaultValue":0.003000000026077032,"DynamicsCompressorNodeAttackMaxValue":1,"DynamicsCompressorNodeAttackMinValue":0,"DynamicsCompressorNodeReleaseDefaultValue":0.25,"DynamicsCompressorNodeReleaseMaxValue":1,"DynamicsCompressorNodeReleaseMinValue":0,"GainNodeGainDefaultValue":1,"GainNodeGainMaxValue":3.4028234663852886e+38,"GainNodeGainMinValue":-3.4028234663852886e+38,"OscillatorNodeFrequencyDefaultValue":440,"OscillatorNodeFrequencyMaxValue":24000,"OscillatorNodeFrequencyMinValue":-24000,"OscillatorNodeDetuneDefaultValue":0,"OscillatorNodeDetuneMaxValue":153600,"OscillatorNodeDetuneMinValue":-153600,"OscillatorNodeType":"sine","StereoPannerNodePanDefaultValue":0,"StereoPannerNodePanMaxValue":1,"StereoPannerNodePanMinValue":-1,"AudioListenerPositionXDefaultValue":0,"AudioListenerPositionXMaxValue":3.4028234663852886e+38,"AudioListenerPositionXMinValue":-3.4028234663852886e+38,"AudioListenerPositionYDefaultValue":0,"AudioListenerPositionYMaxValue":3.4028234663852886e+38,"AudioListenerPositionYMinValue":-3.4028234663852886e+38,"AudioListenerPositionZDefaultValue":0,"AudioListenerPositionZMaxValue":3.4028234663852886e+38,"AudioListenerPositionZMinValue":-3.4028234663852886e+38,"AudioListenerForwardXDefaultValue":0,"AudioListenerForwardXMaxValue":3.4028234663852886e+38,"AudioListenerForwardXMinValue":-3.4028234663852886e+38,"AudioListenerForwardYDefaultValue":0,"AudioListenerForwardYMaxValue":3.4028234663852886e+38,"AudioListenerForwardYMinValue":-3.4028234663852886e+38,"AudioListenerForwardZDefaultValue":-1,"AudioListenerForwardZMaxValue":3.4028234663852886e+38,"AudioListenerForwardZMinValue":-3.4028234663852886e+38,"AudioListenerUpXDefaultValue":0,"AudioListenerUpXMaxValue":3.4028234663852886e+38,"AudioListenerUpXMinValue":-3.4028234663852886e+38,"AudioListenerUpYDefaultValue":1,"AudioListenerUpYMaxValue":3.4028234663852886e+38,"AudioListenerUpYMinValue":-3.4028234663852886e+38,"AudioListenerUpZDefaultValue":0,"AudioListenerUpZMaxValue":3.4028234663852886e+38,"AudioListenerUpZMinValue":-3.4028234663852886e+38,"PannerNodePositionXDefaultValue":0,"PannerNodePositionXMaxValue":3.4028234663852886e+38,"PannerNodePositionXMinValue":-3.4028234663852886e+38,"PannerNodePositionYDefaultValue":0,"PannerNodePositionYMaxValue":3.4028234663852886e+38,"PannerNodePositionYMinValue":-3.4028234663852886e+38,"PannerNodePositionZDefaultValue":0,"PannerNodePositionZMaxValue":3.4028234663852886e+38,"PannerNodePositionZMinValue":-3.4028234663852886e+38,"PannerNodeOrientationXDefaultValue":1,"PannerNodeOrientationXMaxValue":3.4028234663852886e+38,"PannerNodeOrientationXMinValue":-3.4028234663852886e+38,"PannerNodeOrientationYDefaultValue":0,"PannerNodeOrientationYMaxValue":3.4028234663852886e+38,"PannerNodeOrientationYMinValue":-3.4028234663852886e+38,"PannerNodeOrientationZDefaultValue":0,"PannerNodeOrientationZMaxValue":3.4028234663852886e+38,"PannerNodeOrientationZMinValue":-3.4028234663852886e+38},"fonts":["Arial","Arial Black","Calibri","Cambria","Cambria Math","Comic Sans MS","Consolas","Courier New","Georgia","Impact","Lucida Console","Lucida Sans Unicode","Microsoft Sans Serif","MS Gothic","MS PGothic","Palatino Linotype","Segoe Print","Segoe Script","Segoe UI","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Tahoma","Times New Roman","Trebuchet MS","Verdana","Wingdings","Candara","Constantia","Corbel","Ebrima","Gabriola","Malgun Gothic","Marlett","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft YaHei","Microsoft Yi Baiti","MingLiU_HKSCS-ExtB","MingLiU-ExtB","Mongolian Baiti","MS UI Gothic","MV Boli","NSimSun","PMingLiU-ExtB","SimSun","SimSun-ExtB","Sylfaen","Cambria Italic","Corbel Bold Italic","Cambria Bold Italic","Tahoma Negreta","Sitka Banner","Cambria Bold","Trebuchet MS Bold Italic","Microsoft JhengHei Light","Candara Italic","Georgia Bold","Verdana Italic","Javanese Text","Palatino Linotype Bold","Segoe UI Emoji","Leelawadee UI","Yu Gothic UI Light","Verdana Bold Italic","Constantia Bold","Sitka Small","Times New Roman Bold Italic","Franklin Gothic Medium","Sitka Text","Nirmala UI","Calibri Italic","Corbel Bold","Myanmar Text","Franklin Gothic Medium Italic","Segoe UI Semilight","Arial Italic","Sitka Display","Consolas Bold Italic","Sitka Heading","Trebuchet MS Bold","Times New Roman Bold","Segoe UI Historic","Microsoft YaHei UI Light","Malgun Gothic Semilight","Microsoft YaHei UI","Corbel Italic","Microsoft JhengHei UI","Times New Roman Italic","Yu Gothic UI Semilight","Segoe MDL2 Assets","Microsoft YaHei Light","Courier New Bold","Arial Bold","Georgia Bold Italic","Yu Gothic Light","Webdings","Comic Sans MS Bold","Nirmala UI Semilight","Consolas Italic","Yu Gothic Medium","Trebuchet MS Italic","Consolas Bold","Candara Bold Italic","Courier New Bold Italic","Constantia Bold Italic","Microsoft JhengHei UI Light","Arial Bold Italic","Gadugi","Calibri Light","Verdana Bold","Microsoft Tai Le Bold","Constantia Italic","Sitka Subheading","Symbol","Leelawadee UI Semilight","Palatino Linotype Bold Italic","Segoe UI Black","Georgia Italic","Courier New Italic","Candara Bold","Palatino Linotype Italic","Yu Gothic UI Semibold","Calibri Bold Italic","Calibri Bold","Bahnschrift","Bahnschrift Light","Bahnschrift SemiBold","Bahnschrift SemiLight","Calibri Light Italic","Candara Light","Candara Light Italic","Comic Sans MS Bold Italic","Comic Sans MS Italic","Corbel Light","Corbel Light Italic","Ebrima Bold","Gadugi Bold","HoloLens MDL2 Assets","Ink Free","Leelawadee UI Bold","Malgun Gothic Bold","Microsoft JhengHei Bold","Microsoft JhengHei UI Bold","Microsoft New Tai Lue Bold","Microsoft PhagsPa Bold","Microsoft YaHei Bold","Microsoft YaHei UI Bold","Myanmar Text Bold","Nirmala UI Bold","Segoe Print Bold","Segoe Script Bold","Segoe UI Black Italic","Segoe UI Bold","Segoe UI Bold Italic","Segoe UI Italic","Segoe UI Light Italic","Segoe UI Semibold Italic","Segoe UI Semilight Italic","Sitka Banner Bold","Sitka Banner Bold Italic","Sitka Banner Italic","Sitka Display Bold","Sitka Display Bold Italic","Sitka Display Italic","Sitka Heading Bold","Sitka Heading Bold Italic","Sitka Heading Italic","Sitka Small Bold","Sitka Small Bold Italic","Sitka Small Italic","Sitka Subheading Bold","Sitka Subheading Bold Italic","Sitka Subheading Italic","Sitka Text Bold","Sitka Text Bold Italic","Sitka Text Italic","Tahoma Bold","Yu Gothic Bold","Yu Gothic Regular","Yu Gothic UI Bold","Yu Gothic UI Regular","宋体","微软雅黑","ＭＳ ゴシック","ＭＳ Ｐゴシック","Arial Narrow","Courier","MS Sans Serif","MS Serif","Times","Yu Gothic UI","FontAwesome","Franklin Gothic Heavy","Yu Gothic","Franklin Gothic","Microsoft JhengHei Regular","Microsoft JhengHei UI Regular"],"headers":["Host","X-Real-Ip","X-Forwarded-For","Connection","Content-Length","Cache-Control","Sec-Ch-Ua","Accept-Datetime","X-Csrf-Token","If-Unmodified-Since","Authorization","X-Requested-With","If-Modified-Since","If-Range","X-Http-Method-Override","X-Request-Id","Sec-Ch-Ua-Platform","Pragma","Sec-Ch-Ua-Mobile","User-Agent","Content-Type","Max-Forwards","Upgrade-Insecure-Requests","If-None-Match","If-Match","Range","Accept","Origin","Sec-Fetch-Site","Sec-Fetch-Mode","Sec-Fetch-Dest","Referer","Accept-Encoding","Accept-Language"],"lang":"en-US,en;q=0.9","native_code":"function Object() { [native code] }","css":{"any-hover":"hover","any-pointer":"fine","aspect-ratio":20734,"color":8,"color-gamut":"srgb","color-index":0,"device-aspect-ratio":17777,"device-height":900,"device-width":1600,"grid":"0","height":749,"width":1553,"hover":"hover","monochrome":0,"orientation":"landscape","pointer":"fine","prefers-color-scheme":"dark","prefers-contrast":"no-preference","prefers-reduced-motion":"no-preference","resolution":96},"media":{"devices":[{"deviceId":"","kind":"audioinput","label":"","groupId":"ee980e6b38eb2b96c7ae347f510e013d83aa4e3d9dc63e3e8b51e12539c7cfd1"},{"deviceId":"","kind":"videoinput","label":"","groupId":"39afe388bab8dc331b697c1304b8d754ebb6ccf3f3280b711177946ae5c983af"},{"deviceId":"","kind":"audiooutput","label":"","groupId":"24cac178aef8eb210fc685c6479c9bea8cb89bf493524a6feaa8f2a593c7edcd"}],"constraints":{"aspectRatio":true,"autoGainControl":true,"brightness":true,"channelCount":true,"colorTemperature":true,"contrast":true,"deviceId":true,"echoCancellation":true,"exposureCompensation":true,"exposureMode":true,"exposureTime":true,"facingMode":true,"focusDistance":true,"focusMode":true,"frameRate":true,"groupId":true,"height":true,"iso":true,"latency":true,"noiseSuppression":true,"pan":true,"pointsOfInterest":true,"resizeMode":true,"sampleRate":true,"sampleSize":true,"saturation":true,"sharpness":true,"tilt":true,"torch":true,"whiteBalanceMode":true,"width":true,"zoom":true}},"speech":[{"name":"Microsoft David - English (United States)","lang":"en-US","localService":true,"voiceURI":"Microsoft David - English (United States)","default":true},{"name":"Microsoft Mark - English (United States)","lang":"en-US","localService":true,"voiceURI":"Microsoft Mark - English (United States)","default":false},{"name":"Microsoft Zira - English (United States)","lang":"en-US","localService":true,"voiceURI":"Microsoft Zira - English (United States)","default":false},{"name":"Microsoft Adri Online (Natural) - Afrikaans (South Africa)","lang":"af-ZA","localService":false,"voiceURI":"Microsoft Adri Online (Natural) - Afrikaans (South Africa)","default":false},{"name":"Microsoft Mekdes Online (Natural) - Amharic (Ethiopia)","lang":"am-ET","localService":false,"voiceURI":"Microsoft Mekdes Online (Natural) - Amharic (Ethiopia)","default":false},{"name":"Microsoft Salma Online (Natural) - Arabic (Egypt)","lang":"ar-EG","localService":false,"voiceURI":"Microsoft Salma Online (Natural) - Arabic (Egypt)","default":false},{"name":"Microsoft Zariyah Online (Natural) - Arabic (Saudi Arabia)","lang":"ar-SA","localService":false,"voiceURI":"Microsoft Zariyah Online (Natural) - Arabic (Saudi Arabia)","default":false},{"name":"Microsoft Nabanita Online (Natural) - Bangla (Bangladesh)","lang":"bn-BD","localService":false,"voiceURI":"Microsoft Nabanita Online (Natural) - Bangla (Bangladesh)","default":false},{"name":"Microsoft Tanishaa Online (Natural) - Bengali (India)","lang":"bn-IN","localService":false,"voiceURI":"Microsoft Tanishaa Online (Natural) - Bengali (India)","default":false},{"name":"Microsoft Kalina Online (Natural) - Bulgarian (Bulgaria)","lang":"bg-BG","localService":false,"voiceURI":"Microsoft Kalina Online (Natural) - Bulgarian (Bulgaria)","default":false},{"name":"Microsoft Nilar Online (Natural) - Burmese (Myanmar)","lang":"my-MM","localService":false,"voiceURI":"Microsoft Nilar Online (Natural) - Burmese (Myanmar)","default":false},{"name":"Microsoft Joana Online (Natural) - Catalan (Spain)","lang":"ca-ES","localService":false,"voiceURI":"Microsoft Joana Online (Natural) - Catalan (Spain)","default":false},{"name":"Microsoft HiuMaan Online (Natural) - Chinese (Hong Kong)","lang":"zh-HK","localService":false,"voiceURI":"Microsoft HiuMaan Online (Natural) - Chinese (Hong Kong)","default":false},{"name":"Microsoft Xiaoxiao Online (Natural) - Chinese (Mainland)","lang":"zh-CN","localService":false,"voiceURI":"Microsoft Xiaoxiao Online (Natural) - Chinese (Mainland)","default":false},{"name":"Microsoft Yunyang Online (Natural) - Chinese (Mainland)","lang":"zh-CN","localService":false,"voiceURI":"Microsoft Yunyang Online (Natural) - Chinese (Mainland)","default":false},{"name":"Microsoft HsiaoChen Online (Natural) - Chinese (Taiwan)","lang":"zh-TW","localService":false,"voiceURI":"Microsoft HsiaoChen Online (Natural) - Chinese (Taiwan)","default":false},{"name":"Microsoft Gabrijela Online (Natural) - Croatian (Croatia)","lang":"hr-HR","localService":false,"voiceURI":"Microsoft Gabrijela Online (Natural) - Croatian (Croatia)","default":false},{"name":"Microsoft Vlasta Online (Natural) - Czech (Czech)","lang":"cs-CZ","localService":false,"voiceURI":"Microsoft Vlasta Online (Natural) - Czech (Czech)","default":false},{"name":"Microsoft Christel Online (Natural) - Danish (Denmark)","lang":"da-DK","localService":false,"voiceURI":"Microsoft Christel Online (Natural) - Danish (Denmark)","default":false},{"name":"Microsoft Dena Online (Natural) - Dutch (Belgium)","lang":"nl-BE","localService":false,"voiceURI":"Microsoft Dena Online (Natural)...
</code>```
<p>I have no idea how to use it on selenium. Can you help me?</p>

Title: How to change Fingerprint in Selenium

Body:
I use python selenium.
I have a json file with this such fingerprint:

{"valid":true,"plugins":[{"ref":1446158656,"description":"Portable Document Format","filename":"internal-pdf-viewer","name":"PDF Viewer","mimes":[-1248334925,-1004735216]},{"ref":1010824838,"description":"Portable Document Format","filename":"internal-pdf-viewer","name":"Chrome PDF Viewer","mimes":[-1248334925,-1004735216]},{"ref":-1972253206,"description":"Portable Document Format","filename":"internal-pdf-viewer","name":"Chromium PDF Viewer","mimes":[-1248334925,-1004735216]},{"ref":-545395695,"description":"Portable Document Format","filename":"internal-pdf-viewer","name":"Microsoft Edge PDF Viewer","mimes":[-1248334925,-1004735216]},{"ref":1114102244,"description":"Portable Document Format","filename":"internal-pdf-viewer","name":"WebKit built-in PDF","mimes":[-1248334925,-1004735216]}],"mimes":[{"ref":-1248334925,"description":"Portable Document Format","suffixes":"pdf","type":"application/pdf","plugin":1446158656},{"ref":-1004735216,"description":"Portable Document Format","suffixes":"pdf","type":"text/pdf","plugin":1446158656}],"ua":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.42","tags":["Microsoft Windows","Chrome","Desktop","Windows 10"],"dnt":false,"width":1553,"height":749,"canvas":"40f509adc22f058c83898e21b6aec78772e7151591b9c93e2fee5e1180d376884de77289249b27f0f74abb765b8992bca96f28b29bb02c7a309fa718357d3e0d7f83837f837b7c7b7f7e817f7b7b7b7f827c827f827e7b7b7e7c7c7e7e7f7d817b7b81807f80827c7f7b7e837e7e838182827d","webgl":"d3ac117c2e17e9bb6723d9b9676db7d5b9b30cdea3490ae18bc00c49dc04f5015ea71a57b75f4e78048e072f5f107e5e4bfc394c4bf21807b36cfa417deec8067f83837f837b7c7b7f7e817f7b7b7b7f827c827f827e7b7b7e7c7c7e7e7f7d817b7b81807f80827c7f7b7e837e7e838182827d","rectangles":"98ab352f2b85f83343fb33aa75273943d98d27f7cc6bd8f74572b47d63b6e3c53ee99b02d426fac0d50a4dafbf6f51f7d9ed54ba954a93f735d1d2e86e12d605b6ff0100a8bc0600dc3affff1f75ffffd73bfaffb72e05000aeafaffd349faffe1ce0600eb1efeff3a96feff521dfdff08f000001226fbffcc9f020029b505005cccf8ffdecefdffe5e60000402d0300c6aa0000101b0300654efbff8d8afafff9eff9ffa3bcfdffcb6dfeff4bd9feff64dbffffe2bb0200bb110500106c0300a2cd020070e30600710802004b560200321c0200cb3e07009849faff6ba9fdff34c4fbff5847fcff63170300b93df9ffcae9ffffbc97f8ff9f0e0000a7a3f8ff55dc04006ccd0600c043faffb0b5ffff33ecf8ffabbdfcff4252060093080600c383fcffe670f8ffb22604003de6ffff5c6e060086bf0100c2b0fdff862efdff633e1e0e203e1e0e203e1e0e203e1e0e633e1e0e","audio":"f89e8f36583094aecdc796a9768960336dfb6ff317c44bd3f451bc9e7a06419f401a175af59c4c243f891e2d8e4251656e9547194e1c5d85269bb67c46fece04927f8d6d937c6e74828390827e867480836e6b8f8782727873758a8f90848c7e738079937085818a80917a8090786d8c7f6b876f8f7a72798b788b7c7382938593866b856e92926c70898b90868687817f8092918c8b7d91887190718a70818282807286","battery":"aa807911c85f1ba1e96a7060b553c52c356c8308d50a2947918379a376c1bd3a6b47944e4820b463abd7b66f8edd8cfd9b3ce8d91d972c305a0be3e4fa9b940009995a21310d51","has_battery_api":true,"has_battery_device":false,"webgl_properties":{"unmaskedVendor":"Google Inc. (NVIDIA)","unmaskedRenderer":"ANGLE (NVIDIA, NVIDIA GeForce GTX 1070 Direct3D11 vs_5_0 ps_5_0, D3D11)","vendor":"WebKit","renderer":"WebKit WebGL","shadingLanguage":"WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)","version":"WebGL 1.0 (OpenGL ES 2.0 Chromium)","maxAnisotropy":"16","shadingLanguage2":"WebGL GLSL ES 3.00 (OpenGL ES GLSL ES 3.0 Chromium)","version2":"WebGL 2.0 (OpenGL ES 3.0 Chromium)","aliasedLineWidthRange":{"0":1,"1":1},"aliasedPointSizeRange":{"0":1,"1":1024},"alphaBits":"8","blueBits":"8","depthBits":"24","greenBits":"8","maxCombinedTextureImageUnits":"32","maxCubeMapTextureSize":"16384","maxFragmentUniformVectors":"1024","maxRenderBufferSize":"16384","maxTextureImageUnits":"16","maxTextureSize":"16384","maxVaryingVectors":"30","maxVertexAttribs":"16","maxVertexTextureImageUnits":"16","maxVertexUniformVectors":"4095","maxViewportDims":{"0":32767,"1":32767},"redBits":"8","stencilBits":"8","subpixelBits":"4","sampleBuffers":"1","samples":"4","stencilBackValueMask":"2147483647","stencilBackWritemask":"2147483647","stencilValueMask":"2147483647","stencilWritemask":"2147483647","maxColorAttachmentsWebgl":"8","maxDrawBuffersWebgl":"8","webglContextAttributesDefaults":{"alpha":true,"antialias":true,"depth":true,"desynchronized":false,"failIfMajorPerformanceCaveat":false,"powerPreference":"default","premultipliedAlpha":true,"preserveDrawingBuffer":false,"stencil":false,"xrCompatible":false},"extensions":"ANGLE_instanced_arrays,EXT_blend_minmax,EXT_color_buffer_half_float,EXT_disjoint_timer_query,EXT_float_blend,EXT_frag_depth,EXT_shader_texture_lod,EXT_texture_compression_bptc,EXT_texture_compression_rgtc,EXT_texture_filter_anisotropic,EXT_sRGB,KHR_parallel_shader_compile,OES_element_index_uint,OES_fbo_render_mipmap,OES_standard_derivatives,OES_texture_float,OES_texture_float_linear,OES_texture_half_float,OES_texture_half_float_linear,OES_vertex_array_object,WEBGL_color_buffer_float,WEBGL_compressed_texture_s3tc,WEBGL_compressed_texture_s3tc_srgb,WEBGL_debug_renderer_info,WEBGL_debug_shaders,WEBGL_depth_texture,WEBGL_draw_buffers,WEBGL_lose_context,WEBGL_multi_draw","precisionVertexShaderHighFloat":23,"rangeMinVertexShaderHighFloat":127,"rangeMaxVertexShaderHighFloat":127,"precisionVertexShaderMediumFloat":23,"rangeMinVertexShaderMediumFloat":127,"rangeMaxVertexShaderMediumFloat":127,"precisionVertexShaderLowFloat":23,"rangeMinVertexShaderLowFloat":127,"rangeMaxVertexShaderLowFloat":127,"precisionFragmentShaderHighFloat":23,"rangeMinFragmentShaderHighFloat":127,"rangeMaxFragmentShaderHighFloat":127,"precisionFragmentShaderMediumFloat":23,"rangeMinFragmentShaderMediumFloat":127,"rangeMaxFragmentShaderMediumFloat":127,"precisionFragmentShaderLowFloat":23,"rangeMinFragmentShaderLowFloat":127,"rangeMaxFragmentShaderLowFloat":127,"precisionVertexShaderHighInt":0,"rangeMinVertexShaderHighInt":31,"rangeMaxVertexShaderHighInt":30,"precisionVertexShaderMediumInt":0,"rangeMinVertexShaderMediumInt":31,"rangeMaxVertexShaderMediumInt":30,"precisionVertexShaderLowInt":0,"rangeMinVertexShaderLowInt":31,"rangeMaxVertexShaderLowInt":30,"precisionFragmentShaderHighInt":0,"rangeMinFragmentShaderHighInt":31,"rangeMaxFragmentShaderHighInt":30,"precisionFragmentShaderMediumInt":0,"rangeMinFragmentShaderMediumInt":31,"rangeMaxFragmentShaderMediumInt":30,"precisionFragmentShaderLowInt":0,"rangeMinFragmentShaderLowInt":31,"rangeMaxFragmentShaderLowInt":30,"maxVertexUniformComponents2":"16380","maxVertexUniformBlocks2":"12","maxVertexOutputComponents2":"120","maxVaryingComponents2":"120","maxTransformFeedbackInterleavedComponents2":"120","maxTransformFeedbackSeparateAttribs2":"4","maxTransformFeedbackSeparateComponents2":"4","maxFragmentUniformComponents2":"4096","maxFragmentUniformBlocks2":"12","maxFragmentInputComponents2":"120","minProgramTexelOffset2":"-8","maxProgramTexelOffset2":"7","maxDrawBuffers2":"8","maxColorAttachments2":"8","maxSamples2":"8","max3DTextureSize2":"2048","maxArrayTextureLayers2":"2048","maxClientWaitTimeoutWebgl2":"0","maxElementIndex2":"4294967294","maxServerWaitTimeout2":"0","stencilBackValueMask2":"2147483647","stencilBackWritemask2":"2147483647","stencilValueMask2":"2147483647","stencilWritemask2":"2147483647","maxTextureLodBias2":"2","maxUniformBufferBindings2":"24","maxUniformBlockSize2":"65536","uniformBufferOffsetAlignment2":"256","maxCombinedUniformBlocks2":"24","maxCombinedVertexUniformComponents2":"212988","maxCombinedFragmentUniformComponents2":"200704","maxElementsVertices2":"2147483647","maxElementsIndices2":"2147483647","aliasedLineWidthRange2":{"0":1,"1":1},"aliasedPointSizeRange2":{"0":1,"1":1024},"webglContextAttributesDefaults2":{"alpha":true,"antialias":true,"depth":true,"desynchronized":false,"failIfMajorPerformanceCaveat":false,"powerPreference":"default","premultipliedAlpha":true,"preserveDrawingBuffer":false,"stencil":false,"xrCompatible":false},"alphaBits2":"8","blueBits2":"8","depthBits2":"24","greenBits2":"8","maxCombinedTextureImageUnits2":"32","maxCubeMapTextureSize2":"16384","maxFragmentUniformVectors2":"1024","maxRenderBufferSize2":"16384","maxTextureImageUnits2":"16","maxTextureSize2":"16384","maxVaryingVectors2":"30","maxVertexAttribs2":"16","maxVertexTextureImageUnits2":"16","maxVertexUniformVectors2":"4095","maxViewportDims2":{"0":32767,"1":32767},"redBits2":"8","stencilBits2":"8","subpixelBits2":"4","sampleBuffers2":"1","samples2":"4","extensions2":"EXT_color_buffer_float,EXT_color_buffer_half_float,EXT_disjoint_timer_query_webgl2,EXT_float_blend,EXT_texture_compression_bptc,EXT_texture_compression_rgtc,EXT_texture_filter_anisotropic,EXT_texture_norm16,KHR_parallel_shader_compile,OES_draw_buffers_indexed,OES_texture_float_linear,WEBGL_compressed_texture_s3tc,WEBGL_compressed_texture_s3tc_srgb,WEBGL_debug_renderer_info,WEBGL_debug_shaders,WEBGL_lose_context,WEBGL_multi_draw,OVR_multiview2","precisionVertexShaderHighFloat2":23,"rangeMinVertexShaderHighFloat2":127,"rangeMaxVertexShaderHighFloat2":127,"precisionVertexShaderMediumFloat2":23,"rangeMinVertexShaderMediumFloat2":127,"rangeMaxVertexShaderMediumFloat2":127,"precisionVertexShaderLowFloat2":23,"rangeMinVertexShaderLowFloat2":127,"rangeMaxVertexShaderLowFloat2":127,"precisionFragmentShaderHighFloat2":23,"rangeMinFragmentShaderHighFloat2":127,"rangeMaxFragmentShaderHighFloat2":127,"precisionFragmentShaderMediumFloat2":23,"rangeMinFragmentShaderMediumFloat2":127,"rangeMaxFragmentShaderMediumFloat2":127,"precisionFragmentShaderLowFloat2":23,"rangeMinFragmentShaderLowFloat2":127,"rangeMaxFragmentShaderLowFloat2":127,"precisionVertexShaderHighInt2":0,"rangeMinVertexShaderHighInt2":31,"rangeMaxVertexShaderHighInt2":30,"precisionVertexShaderMediumInt2":0,"rangeMinVertexShaderMediumInt2":31,"rangeMaxVertexShaderMediumInt2":30,"precisionVertexShaderLowInt2":0,"rangeMinVertexShaderLowInt2":31,"rangeMaxVertexShaderLowInt2":30,"precisionFragmentShaderHighInt2":0,"rangeMinFragmentShaderHighInt2":31,"rangeMaxFragmentShaderHighInt2":30,"precisionFragmentShaderMediumInt2":0,"rangeMinFragmentShaderMediumInt2":31,"rangeMaxFragmentShaderMediumInt2":30,"precisionFragmentShaderLowInt2":0,"rangeMinFragmentShaderLowInt2":31,"rangeMaxFragmentShaderLowInt2":30},"audio_properties":{"BaseAudioContextSampleRate":48000,"AudioContextBaseLatency":0.01,"AudioContextOutputLatency":0,"AudioDestinationNodeMaxChannelCount":2,"AnalyzerNodeFftSize":2048,"AnalyzerNodeFrequencyBinCount":1024,"AnalyzerNodeMinDecibels":-100,"AnalyzerNodeMaxDecibels":-30,"AnalyzerNodeSmoothingTimeConstant":0.8,"BiquadFilterNodeFrequencyDefaultValue":350,"BiquadFilterNodeFrequencyMaxValue":24000,"BiquadFilterNodeFrequencyMinValue":0,"BiquadFilterNodeDetuneDefaultValue":0,"BiquadFilterNodeDetuneMaxValue":153600,"BiquadFilterNodeDetuneMinValue":-153600,"BiquadFilterNodeQDefaultValue":1,"BiquadFilterNodeQMaxValue":3.4028234663852886e+38,"BiquadFilterNodeQMinValue":-3.4028234663852886e+38,"BiquadFilterNodeGainDefaultValue":0,"BiquadFilterNodeGainMaxValue":1541.273681640625,"BiquadFilterNodeGainMinValue":-3.4028234663852886e+38,"BiquadFilterNodeType":"lowpass","AudioBufferSourceNodeDetuneDefaultValue":0,"AudioBufferSourceNodeDetuneMaxValue":3.4028234663852886e+38,"AudioBufferSourceNodeDetuneMinValue":-3.4028234663852886e+38,"AudioBufferSourceNodePlaybackRateDefaultValue":1,"AudioBufferSourceNodePlaybackRateMaxValue":3.4028234663852886e+38,"AudioBufferSourceNodePlaybackRateMinValue":-3.4028234663852886e+38,"ConstantSourceNodeOffsetDefaultValue":1,"ConstantSourceNodeOffsetMaxValue":3.4028234663852886e+38,"ConstantSourceNodeOffsetMinValue":-3.4028234663852886e+38,"DelayNodeDelayTimeDefaultValue":0,"DelayNodeDelayTimeMaxValue":1,"DelayNodeDelayTimeMinValue":0,"DynamicsCompressorNodeThresholdDefaultValue":-24,"DynamicsCompressorNodeThresholdMaxValue":0,"DynamicsCompressorNodeThresholdMinValue":-100,"DynamicsCompressorNodeKneeDefaultValue":30,"DynamicsCompressorNodeKneeMaxValue":40,"DynamicsCompressorNodeKneeMinValue":0,"DynamicsCompressorNodeRatioDefaultValue":12,"DynamicsCompressorNodeRatioMaxValue":20,"DynamicsCompressorNodeRatioMinValue":1,"DynamicsCompressorNodeReduction":0,"DynamicsCompressorNodeAttackDefaultValue":0.003000000026077032,"DynamicsCompressorNodeAttackMaxValue":1,"DynamicsCompressorNodeAttackMinValue":0,"DynamicsCompressorNodeReleaseDefaultValue":0.25,"DynamicsCompressorNodeReleaseMaxValue":1,"DynamicsCompressorNodeReleaseMinValue":0,"GainNodeGainDefaultValue":1,"GainNodeGainMaxValue":3.4028234663852886e+38,"GainNodeGainMinValue":-3.4028234663852886e+38,"OscillatorNodeFrequencyDefaultValue":440,"OscillatorNodeFrequencyMaxValue":24000,"OscillatorNodeFrequencyMinValue":-24000,"OscillatorNodeDetuneDefaultValue":0,"OscillatorNodeDetuneMaxValue":153600,"OscillatorNodeDetuneMinValue":-153600,"OscillatorNodeType":"sine","StereoPannerNodePanDefaultValue":0,"StereoPannerNodePanMaxValue":1,"StereoPannerNodePanMinValue":-1,"AudioListenerPositionXDefaultValue":0,"AudioListenerPositionXMaxValue":3.4028234663852886e+38,"AudioListenerPositionXMinValue":-3.4028234663852886e+38,"AudioListenerPositionYDefaultValue":0,"AudioListenerPositionYMaxValue":3.4028234663852886e+38,"AudioListenerPositionYMinValue":-3.4028234663852886e+38,"AudioListenerPositionZDefaultValue":0,"AudioListenerPositionZMaxValue":3.4028234663852886e+38,"AudioListenerPositionZMinValue":-3.4028234663852886e+38,"AudioListenerForwardXDefaultValue":0,"AudioListenerForwardXMaxValue":3.4028234663852886e+38,"AudioListenerForwardXMinValue":-3.4028234663852886e+38,"AudioListenerForwardYDefaultValue":0,"AudioListenerForwardYMaxValue":3.4028234663852886e+38,"AudioListenerForwardYMinValue":-3.4028234663852886e+38,"AudioListenerForwardZDefaultValue":-1,"AudioListenerForwardZMaxValue":3.4028234663852886e+38,"AudioListenerForwardZMinValue":-3.4028234663852886e+38,"AudioListenerUpXDefaultValue":0,"AudioListenerUpXMaxValue":3.4028234663852886e+38,"AudioListenerUpXMinValue":-3.4028234663852886e+38,"AudioListenerUpYDefaultValue":1,"AudioListenerUpYMaxValue":3.4028234663852886e+38,"AudioListenerUpYMinValue":-3.4028234663852886e+38,"AudioListenerUpZDefaultValue":0,"AudioListenerUpZMaxValue":3.4028234663852886e+38,"AudioListenerUpZMinValue":-3.4028234663852886e+38,"PannerNodePositionXDefaultValue":0,"PannerNodePositionXMaxValue":3.4028234663852886e+38,"PannerNodePositionXMinValue":-3.4028234663852886e+38,"PannerNodePositionYDefaultValue":0,"PannerNodePositionYMaxValue":3.4028234663852886e+38,"PannerNodePositionYMinValue":-3.4028234663852886e+38,"PannerNodePositionZDefaultValue":0,"PannerNodePositionZMaxValue":3.4028234663852886e+38,"PannerNodePositionZMinValue":-3.4028234663852886e+38,"PannerNodeOrientationXDefaultValue":1,"PannerNodeOrientationXMaxValue":3.4028234663852886e+38,"PannerNodeOrientationXMinValue":-3.4028234663852886e+38,"PannerNodeOrientationYDefaultValue":0,"PannerNodeOrientationYMaxValue":3.4028234663852886e+38,"PannerNodeOrientationYMinValue":-3.4028234663852886e+38,"PannerNodeOrientationZDefaultValue":0,"PannerNodeOrientationZMaxValue":3.4028234663852886e+38,"PannerNodeOrientationZMinValue":-3.4028234663852886e+38},"fonts":["Arial","Arial Black","Calibri","Cambria","Cambria Math","Comic Sans MS","Consolas","Courier New","Georgia","Impact","Lucida Console","Lucida Sans Unicode","Microsoft Sans Serif","MS Gothic","MS PGothic","Palatino Linotype","Segoe Print","Segoe Script","Segoe UI","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Tahoma","Times New Roman","Trebuchet MS","Verdana","Wingdings","Candara","Constantia","Corbel","Ebrima","Gabriola","Malgun Gothic","Marlett","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft YaHei","Microsoft Yi Baiti","MingLiU_HKSCS-ExtB","MingLiU-ExtB","Mongolian Baiti","MS UI Gothic","MV Boli","NSimSun","PMingLiU-ExtB","SimSun","SimSun-ExtB","Sylfaen","Cambria Italic","Corbel Bold Italic","Cambria Bold Italic","Tahoma Negreta","Sitka Banner","Cambria Bold","Trebuchet MS Bold Italic","Microsoft JhengHei Light","Candara Italic","Georgia Bold","Verdana Italic","Javanese Text","Palatino Linotype Bold","Segoe UI Emoji","Leelawadee UI","Yu Gothic UI Light","Verdana Bold Italic","Constantia Bold","Sitka Small","Times New Roman Bold Italic","Franklin Gothic Medium","Sitka Text","Nirmala UI","Calibri Italic","Corbel Bold","Myanmar Text","Franklin Gothic Medium Italic","Segoe UI Semilight","Arial Italic","Sitka Display","Consolas Bold Italic","Sitka Heading","Trebuchet MS Bold","Times New Roman Bold","Segoe UI Historic","Microsoft YaHei UI Light","Malgun Gothic Semilight","Microsoft YaHei UI","Corbel Italic","Microsoft JhengHei UI","Times New Roman Italic","Yu Gothic UI Semilight","Segoe MDL2 Assets","Microsoft YaHei Light","Courier New Bold","Arial Bold","Georgia Bold Italic","Yu Gothic Light","Webdings","Comic Sans MS Bold","Nirmala UI Semilight","Consolas Italic","Yu Gothic Medium","Trebuchet MS Italic","Consolas Bold","Candara Bold Italic","Courier New Bold Italic","Constantia Bold Italic","Microsoft JhengHei UI Light","Arial Bold Italic","Gadugi","Calibri Light","Verdana Bold","Microsoft Tai Le Bold","Constantia Italic","Sitka Subheading","Symbol","Leelawadee UI Semilight","Palatino Linotype Bold Italic","Segoe UI Black","Georgia Italic","Courier New Italic","Candara Bold","Palatino Linotype Italic","Yu Gothic UI Semibold","Calibri Bold Italic","Calibri Bold","Bahnschrift","Bahnschrift Light","Bahnschrift SemiBold","Bahnschrift SemiLight","Calibri Light Italic","Candara Light","Candara Light Italic","Comic Sans MS Bold Italic","Comic Sans MS Italic","Corbel Light","Corbel Light Italic","Ebrima Bold","Gadugi Bold","HoloLens MDL2 Assets","Ink Free","Leelawadee UI Bold","Malgun Gothic Bold","Microsoft JhengHei Bold","Microsoft JhengHei UI Bold","Microsoft New Tai Lue Bold","Microsoft PhagsPa Bold","Microsoft YaHei Bold","Microsoft YaHei UI Bold","Myanmar Text Bold","Nirmala UI Bold","Segoe Print Bold","Segoe Script Bold","Segoe UI Black Italic","Segoe UI Bold","Segoe UI Bold Italic","Segoe UI Italic","Segoe UI Light Italic","Segoe UI Semibold Italic","Segoe UI Semilight Italic","Sitka Banner Bold","Sitka Banner Bold Italic","Sitka Banner Italic","Sitka Display Bold","Sitka Display Bold Italic","Sitka Display Italic","Sitka Heading Bold","Sitka Heading Bold Italic","Sitka Heading Italic","Sitka Small Bold","Sitka Small Bold Italic","Sitka Small Italic","Sitka Subheading Bold","Sitka Subheading Bold Italic","Sitka Subheading Italic","Sitka Text Bold","Sitka Text Bold Italic","Sitka Text Italic","Tahoma Bold","Yu Gothic Bold","Yu Gothic Regular","Yu Gothic UI Bold","Yu Gothic UI Regular","宋体","微软雅黑","ＭＳ ゴシック","ＭＳ Ｐゴシック","Arial Narrow","Courier","MS Sans Serif","MS Serif","Times","Yu Gothic UI","FontAwesome","Franklin Gothic Heavy","Yu Gothic","Franklin Gothic","Microsoft JhengHei Regular","Microsoft JhengHei UI Regular"],"headers":["Host","X-Real-Ip","X-Forwarded-For","Connection","Content-Length","Cache-Control","Sec-Ch-Ua","Accept-Datetime","X-Csrf-Token","If-Unmodified-Since","Authorization","X-Requested-With","If-Modified-Since","If-Range","X-Http-Method-Override","X-Request-Id","Sec-Ch-Ua-Platform","Pragma","Sec-Ch-Ua-Mobile","User-Agent","Content-Type","Max-Forwards","Upgrade-Insecure-Requests","If-None-Match","If-Match","Range","Accept","Origin","Sec-Fetch-Site","Sec-Fetch-Mode","Sec-Fetch-Dest","Referer","Accept-Encoding","Accept-Language"],"lang":"en-US,en;q=0.9","native_code":"function Object() { [native code] }","css":{"any-hover":"hover","any-pointer":"fine","aspect-ratio":20734,"color":8,"color-gamut":"srgb","color-index":0,"device-aspect-ratio":17777,"device-height":900,"device-width":1600,"grid":"0","height":749,"width":1553,"hover":"hover","monochrome":0,"orientation":"landscape","pointer":"fine","prefers-color-scheme":"dark","prefers-contrast":"no-preference","prefers-reduced-motion":"no-preference","resolution":96},"media":{"devices":[{"deviceId":"","kind":"audioinput","label":"","groupId":"ee980e6b38eb2b96c7ae347f510e013d83aa4e3d9dc63e3e8b51e12539c7cfd1"},{"deviceId":"","kind":"videoinput","label":"","groupId":"39afe388bab8dc331b697c1304b8d754ebb6ccf3f3280b711177946ae5c983af"},{"deviceId":"","kind":"audiooutput","label":"","groupId":"24cac178aef8eb210fc685c6479c9bea8cb89bf493524a6feaa8f2a593c7edcd"}],"constraints":{"aspectRatio":true,"autoGainControl":true,"brightness":true,"channelCount":true,"colorTemperature":true,"contrast":true,"deviceId":true,"echoCancellation":true,"exposureCompensation":true,"exposureMode":true,"exposureTime":true,"facingMode":true,"focusDistance":true,"focusMode":true,"frameRate":true,"groupId":true,"height":true,"iso":true,"latency":true,"noiseSuppression":true,"pan":true,"pointsOfInterest":true,"resizeMode":true,"sampleRate":true,"sampleSize":true,"saturation":true,"sharpness":true,"tilt":true,"torch":true,"whiteBalanceMode":true,"width":true,"zoom":true}},"speech":[{"name":"Microsoft David - English (United States)","lang":"en-US","localService":true,"voiceURI":"Microsoft David - English (United States)","default":true},{"name":"Microsoft Mark - English (United States)","lang":"en-US","localService":true,"voiceURI":"Microsoft Mark - English (United States)","default":false},{"name":"Microsoft Zira - English (United States)","lang":"en-US","localService":true,"voiceURI":"Microsoft Zira - English (United States)","default":false},{"name":"Microsoft Adri Online (Natural) - Afrikaans (South Africa)","lang":"af-ZA","localService":false,"voiceURI":"Microsoft Adri Online (Natural) - Afrikaans (South Africa)","default":false},{"name":"Microsoft Mekdes Online (Natural) - Amharic (Ethiopia)","lang":"am-ET","localService":false,"voiceURI":"Microsoft Mekdes Online (Natural) - Amharic (Ethiopia)","default":false},{"name":"Microsoft Salma Online (Natural) - Arabic (Egypt)","lang":"ar-EG","localService":false,"voiceURI":"Microsoft Salma Online (Natural) - Arabic (Egypt)","default":false},{"name":"Microsoft Zariyah Online (Natural) - Arabic (Saudi Arabia)","lang":"ar-SA","localService":false,"voiceURI":"Microsoft Zariyah Online (Natural) - Arabic (Saudi Arabia)","default":false},{"name":"Microsoft Nabanita Online (Natural) - Bangla (Bangladesh)","lang":"bn-BD","localService":false,"voiceURI":"Microsoft Nabanita Online (Natural) - Bangla (Bangladesh)","default":false},{"name":"Microsoft Tanishaa Online (Natural) - Bengali (India)","lang":"bn-IN","localService":false,"voiceURI":"Microsoft Tanishaa Online (Natural) - Bengali (India)","default":false},{"name":"Microsoft Kalina Online (Natural) - Bulgarian (Bulgaria)","lang":"bg-BG","localService":false,"voiceURI":"Microsoft Kalina Online (Natural) - Bulgarian (Bulgaria)","default":false},{"name":"Microsoft Nilar Online (Natural) - Burmese (Myanmar)","lang":"my-MM","localService":false,"voiceURI":"Microsoft Nilar Online (Natural) - Burmese (Myanmar)","default":false},{"name":"Microsoft Joana Online (Natural) - Catalan (Spain)","lang":"ca-ES","localService":false,"voiceURI":"Microsoft Joana Online (Natural) - Catalan (Spain)","default":false},{"name":"Microsoft HiuMaan Online (Natural) - Chinese (Hong Kong)","lang":"zh-HK","localService":false,"voiceURI":"Microsoft HiuMaan Online (Natural) - Chinese (Hong Kong)","default":false},{"name":"Microsoft Xiaoxiao Online (Natural) - Chinese (Mainland)","lang":"zh-CN","localService":false,"voiceURI":"Microsoft Xiaoxiao Online (Natural) - Chinese (Mainland)","default":false},{"name":"Microsoft Yunyang Online (Natural) - Chinese (Mainland)","lang":"zh-CN","localService":false,"voiceURI":"Microsoft Yunyang Online (Natural) - Chinese (Mainland)","default":false},{"name":"Microsoft HsiaoChen Online (Natural) - Chinese (Taiwan)","lang":"zh-TW","localService":false,"voiceURI":"Microsoft HsiaoChen Online (Natural) - Chinese (Taiwan)","default":false},{"name":"Microsoft Gabrijela Online (Natural) - Croatian (Croatia)","lang":"hr-HR","localService":false,"voiceURI":"Microsoft Gabrijela Online (Natural) - Croatian (Croatia)","default":false},{"name":"Microsoft Vlasta Online (Natural) - Czech (Czech)","lang":"cs-CZ","localService":false,"voiceURI":"Microsoft Vlasta Online (Natural) - Czech (Czech)","default":false},{"name":"Microsoft Christel Online (Natural) - Danish (Denmark)","lang":"da-DK","localService":false,"voiceURI":"Microsoft Christel Online (Natural) - Danish (Denmark)","default":false},{"name":"Microsoft Dena Online (Natural) - Dutch (Belgium)","lang":"nl-BE","localService":false,"voiceURI":"Microsoft Dena Online (Natural)...

I have no idea how to use it on selenium. Can you help me?


来源: stackexchange

问:
Getting the same result without GridSearchCV
I'm currently using GridSearchCV for a nn project and wondering how can I get the same result (using the resulted hyperparameters from the GridSearchCV) but without using the GridSearchCV? What's the proper code to replicate this but without GridSearchCV use?

Here's my code using GridSearchCV:

```<code> from numpy.random import seed
seed(1)
import tensorflow as tf
tf.random.set_seed(2)

X = df.drop(['A','B','C','D','E'],axis=1).values
y = df['A'].values

from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X,y,test_size=0.2,random_state=42)
# X_test, X_val, y_test, y_val = train_test_split(X_test,y_test,test_size=0.5,random_state=101)

from sklearn.preprocessing import MinMaxScaler,StandardScaler
scaler = StandardScaler()
scaler.fit(X_train)
X_train = scaler.transform(X_train)
X_test = scaler.transform(X_test)

print(X.shape)

kfold = KFold(5, shuffle=True,random_state=42)

#############
def buildModel():

    model = Sequential()

    model.add(Dense(9,activation='tanh'))

    model.add(Dense(1))

    model.compile(optimizer=SGD(learning_rate=0.01,momentum=0.6),loss='mse',metrics=['mean_squared_error'])

    return model

from sklearn.model_selection import GridSearchCV
from tensorflow.keras.wrappers.scikit_learn import KerasRegressor

model = KerasRegressor(build_fn=buildModel)

parameters = {'batch_size': [10,15],
              'epochs': [100,200,250]}

grid_search = GridSearchCV(estimator=model,param_grid=parameters,cv=kfold,scoring='neg_mean_squared_error',verbose=10)

grid_search = grid_search.fit(X_train,y_train,verbose=10)

best_parameters = grid_search.best_params_
best_score = grid_search.best_score_

>> Best Parameters: {'batch_size': 10, 'epochs': 100}
</code>```

ContentLicense: CC BY-SA 4.0

Body:
I'm currently using GridSearchCV for a nn project and wondering how can I get the same result (using the resulted hyperparameters from the GridSearchCV) but without using the GridSearchCV? What's the proper code to replicate this but without GridSearchCV use?

Here's my code using GridSearchCV:

 from numpy.random import seed
seed(1)
import tensorflow as tf
tf.random.set_seed(2)

X = df.drop(['A','B','C','D','E'],axis=1).values
y = df['A'].values

from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X,y,test_size=0.2,random_state=42)
# X_test, X_val, y_test, y_val = train_test_split(X_test,y_test,test_size=0.5,random_state=101)

from sklearn.preprocessing import MinMaxScaler,StandardScaler
scaler = StandardScaler()
scaler.fit(X_train)
X_train = scaler.transform(X_train)
X_test = scaler.transform(X_test)

print(X.shape)

kfold = KFold(5, shuffle=True,random_state=42)

#############
def buildModel():

    model = Sequential()

    model.add(Dense(9,activation='tanh'))

    model.add(Dense(1))

    model.compile(optimizer=SGD(learning_rate=0.01,momentum=0.6),loss='mse',metrics=['mean_squared_error'])

    return model

from sklearn.model_selection import GridSearchCV
from tensorflow.keras.wrappers.scikit_learn import KerasRegressor

model = KerasRegressor(build_fn=buildModel)

parameters = {'batch_size': [10,15],
              'epochs': [100,200,250]}

grid_search = GridSearchCV(estimator=model,param_grid=parameters,cv=kfold,scoring='neg_mean_squared_error',verbose=10)

grid_search = grid_search.fit(X_train,y_train,verbose=10)

best_parameters = grid_search.best_params_
best_score = grid_search.best_score_

>> Best Parameters: {'batch_size': 10, 'epochs': 100}


问:
firebase authentication signIn via ServiceWorker does not work immediately
I've implemented SSR+Auth with Next.js by following the tutorial
With below onSubmit logic using setTimeout, I can get authorization header info on getServerSideProps.
But, without that, I cannot.

I don't know why firebase authentication signIn via ServiceWorker does not work immediately, and is there better way to handle that than using setTimeout.

↓NextPage

```<code>const Signin: NextPage = () => {
  const router = useRouter();

  const onSubmit = async (event: FormEvent) => {
    event.preventDefault();
    try {
      await signin(email, password);

      //　↓↓↓↓↓↓↓↓↓↓↓↓↓↓ There is no page transition without this line（only when first signIn）
      await new Promise((resolve) => setTimeout(resolve, 1000));
      //　↑↑↑↑↑↑↑↑↑↑↑↑↑↑

      router.push("/home");
    } catch (error) {
      ~~~
    }
  };

  return (// Signin form template)
};

export default Signin;
</code>```

↓getServerSideProps

```<code>export const getServerSideAuthProps: GetServerSideProps = async (ctx) => {

    let headers;
    if (ctx.req.headers.authorization) {
        headers = { authorization: ctx.req.headers.authorization };
    } else {
     ~~~~
    }

    ~~~~

    return {
        props: authProps,
    }
}
</code>```
```<code>const signin = async (email: string, password: string) => {
  const auth = getFirebaseAuth();
  const result = await signInWithEmailAndPassword(auth, email, password);
};
</code>```

As mentioned above,
with this line it does work.

```<code>      //　↓↓↓↓↓↓↓↓↓↓↓↓↓↓ There is no page transition without this line（only when first signIn）
      await new Promise((resolve) => setTimeout(resolve, 1000));
      //　↑↑↑↑↑↑↑↑↑↑↑↑↑↑
</code>```

Body:
I've implemented SSR+Auth with Next.js by following the tutorial
With below onSubmit logic using setTimeout, I can get authorization header info on getServerSideProps.
But, without that, I cannot.

I don't know why firebase authentication signIn via ServiceWorker does not work immediately, and is there better way to handle that than using setTimeout.

↓NextPage

const Signin: NextPage = () => {
  const router = useRouter();

  const onSubmit = async (event: FormEvent) => {
    event.preventDefault();
    try {
      await signin(email, password);

      //　↓↓↓↓↓↓↓↓↓↓↓↓↓↓ There is no page transition without this line（only when first signIn）
      await new Promise((resolve) => setTimeout(resolve, 1000));
      //　↑↑↑↑↑↑↑↑↑↑↑↑↑↑

      router.push("/home");
    } catch (error) {
      ~~~
    }
  };

  return (// Signin form template)
};

export default Signin;

↓getServerSideProps

export const getServerSideAuthProps: GetServerSideProps = async (ctx) => {

    let headers;
    if (ctx.req.headers.authorization) {
        headers = { authorization: ctx.req.headers.authorization };
    } else {
     ~~~~
    }

    ~~~~

    return {
        props: authProps,
    }
}

const signin = async (email: string, password: string) => {
  const auth = getFirebaseAuth();
  const result = await signInWithEmailAndPassword(auth, email, password);
};

As mentioned above,
with this line it does work.

      //　↓↓↓↓↓↓↓↓↓↓↓↓↓↓ There is no page transition without this line（only when first signIn）
      await new Promise((resolve) => setTimeout(resolve, 1000));
      //　↑↑↑↑↑↑↑↑↑↑↑↑↑↑


问:
How to solve regenerator-runtime in redux-saga?
enter image description here

try this
import 'regenerator-runtime/runtime';
but sometimes run & sometimes give error regenerator-runtime


问:
Memory,CPU,GPU profiling in containerized Spark cluster
any suggestion in which library/tool should I use for plotting over time RAM,CPU and (optionally) GPU usage of a spark-app submitted to a Docker containerized Spark cluster through spark-submit?

In the documentation Apache suggests to use memory_profiler with commands like:

```<code>python -m memory_profiler profile_memory.py
</code>```

but after accessing to my master node through a remote shell:
docker exec -it spark-master bash
I can't launch locally my spark apps because I need to use the spark-submit command in order to submit it to the cluster.
Any suggestion? I launch the apps w/o YARN but in cluster mode through
/opt/spark/spark-submit --master spark://spark-master:7077 appname.py

I would like also to know if I can use memory_profiler even if I need to use spark-submit

Body:
any suggestion in which library/tool should I use for plotting over time RAM,CPU and (optionally) GPU usage of a spark-app submitted to a Docker containerized Spark cluster through spark-submit?

In the documentation Apache suggests to use memory_profiler with commands like:

python -m memory_profiler profile_memory.py

but after accessing to my master node through a remote shell:
docker exec -it spark-master bash
I can't launch locally my spark apps because I need to use the spark-submit command in order to submit it to the cluster.
Any suggestion? I launch the apps w/o YARN but in cluster mode through
/opt/spark/spark-submit --master spark://spark-master:7077 appname.py

I would like also to know if I can use memory_profiler even if I need to use spark-submit


问:
Temporarily changing a Timestamp column so parked rows can be added
for an erroneous situation we've had to park a bunch of DB rows, which we now want to put back into a table. The problem with this is one of the columns, RowVersion, which is of type Timestamp. Inserting the old values does not seem to be possible, so it seems like these would need to be re-generated. I am still researching what the impact would be (seems none/low).

However, I was thinking of a workaround that does keep the original row values intact. My idea was as follows, in 1 locked transaction:

-- Sample table with only UNIQUEIDENTIFIER Id & TIMESTAMP RowVersion
ALTER TABLE Test
ALTER COLUMN RowVersion VARBINARY(8);

INSERT INTO Test (
    Id,
    RowVersion
)
VALUES (
    'd261ff28-6279-4e81-93f4-825c9ca689bd',
    0x000000000000CF0A
);

ALTER TABLE Test
ALTER COLUMN RowVersion TIMESTAMP;
```

Which results in the error Cannot alter column 'RowVersion' because it is 'timestamp'.. Is there any workaround for this? Or to avoid the XY-problem: Is there any ways of inserting rows with a specific row AND keeping the column as a timestamp?

Body:
for an erroneous situation we've had to park a bunch of DB rows, which we now want to put back into a table. The problem with this is one of the columns, RowVersion, which is of type Timestamp. Inserting the old values does not seem to be possible, so it seems like these would need to be re-generated. I am still researching what the impact would be (seems none/low).

However, I was thinking of a workaround that does keep the original row values intact. My idea was as follows, in 1 locked transaction:

-- Sample table with only UNIQUEIDENTIFIER Id & TIMESTAMP RowVersion
ALTER TABLE Test
ALTER COLUMN RowVersion VARBINARY(8);

INSERT INTO Test (
    Id,
    RowVersion
)
VALUES (
    'd261ff28-6279-4e81-93f4-825c9ca689bd',
    0x000000000000CF0A
);

ALTER TABLE Test
ALTER COLUMN RowVersion TIMESTAMP;

Which results in the error Cannot alter column 'RowVersion' because it is 'timestamp'.. Is there any workaround for this? Or to avoid the XY-problem: Is there any ways of inserting rows with a specific row AND keeping the column as a timestamp?


问:
how to specify ninja path in cmake when use meson
I have specify ninja path in the MakeFile,it will call meson to build.

And I import cmake in the meson.build to build grpc,
but the cmake cannot find ninja.

Program cmake found: YES (/opt/homebrew/bin/cmake)
error retrieving cmake information: returnCode=255 stdout= stderr=CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
Error: --system-information failed on internal CMake!

Any help will be appriated!


问:
$.id : ['The JSON value could not be converted to System.Gu…h: $.id | LineNumber: 0 | BytePositionInLine: 41.']
I have developed an employee management system using .net 6(web API) and angular 14. When posting an employee this error is coming.

```<code>$.id:['The JSON value could not be converted to System.Gu…h: $.id | LineNumber: 0 | BytePositionInLine: 41.']
</code>```

In the model of .net web API id has mentioned as below

```<code> public Guid Id { get; set; }
</code>```

For further clarifications

To prevent that I inserted a string by default for the id as below.

```<code>addEmployee(addEmployeeRequest:Employee):Observable<Employee>{
  addEmployeeRequest.id='00000000-0000-0000-0000-000000000000';
  return this.http.post<Employee>(this.baseApiUrl+'/api/employees',addEmployeeRequest)
 }
</code>```

But the error remains the same as previous one.

Body:
I have developed an employee management system using .net 6(web API) and angular 14. When posting an employee this error is coming.

$.id:['The JSON value could not be converted to System.Gu…h: $.id | LineNumber: 0 | BytePositionInLine: 41.']

In the model of .net web API id has mentioned as below

 public Guid Id { get; set; }

For further clarifications

To prevent that I inserted a string by default for the id as below.

addEmployee(addEmployeeRequest:Employee):Observable<Employee>{
  addEmployeeRequest.id='00000000-0000-0000-0000-000000000000';
  return this.http.post<Employee>(this.baseApiUrl+'/api/employees',addEmployeeRequest)
 }

But the error remains the same as previous one.


问:
How Can I draw Line between these Indicator ImageButton in JAVA Android Studio
I want to draw a line between these buttons programmatically because the user will determine where he/she be going so according to that information it should draw line between certain buttons. I am new to Android world and still learning it.
Thanks in advance

I have tried the canvas class available but I dont know how to display the line between the buttons and show it on my main activity.

This is the map


问:
Is it possible to generate an apk in Unity that works differently depending on whether it is Quest 2 or a phone?
I am using Unity 2020.3.37f1 and I am generating a multiplayer application that can communicate both in VR and in desktop/conventional mode, I have the scene change programmed depending on the platform it is on, my main problem is that I think the apks generated for Quest have some type of extra information in the Manifest or Oculus libraries in general that prevent their execution on a mobile device since I tried to make it work on my phone (Oppo Find X5 Pro with Android 13) and after the Unity logo simply it closes but in Quest 2 it works perfectly.

Does anyone know what steps to follow when developing an application like this? In the case that it was not possible from the same apk and I had to generate two different ones, what would be the procedure to do it in a way that makes it as easy as possible to switch between the two versions (and thus be able to automate it when building both apks)?

I tried to generate an apk that would work for both Quest 2 and Android but got the following error on the adb console

```<code>2023-01-03 12:32:59.297 15363-15435/? E/Unity: Exiting application:

    This .apk was built with the Oculus XR Plugin loader enabled, but is attempting to run on a non-Oculus device.
    To build for general Android devices, please disable the Oculus XR Plugin before building the Android player.

    Unity.XR.Oculus.OculusLoader:RuntimeLoadOVRPlugin()
</code>```

What I expect to happen is that it can be executed on both platforms since my intention is that Unity itself separates (with my own script) both platforms in different scenes.

Body:
I am using Unity 2020.3.37f1 and I am generating a multiplayer application that can communicate both in VR and in desktop/conventional mode, I have the scene change programmed depending on the platform it is on, my main problem is that I think the apks generated for Quest have some type of extra information in the Manifest or Oculus libraries in general that prevent their execution on a mobile device since I tried to make it work on my phone (Oppo Find X5 Pro with Android 13) and after the Unity logo simply it closes but in Quest 2 it works perfectly.

Does anyone know what steps to follow when developing an application like this? In the case that it was not possible from the same apk and I had to generate two different ones, what would be the procedure to do it in a way that makes it as easy as possible to switch between the two versions (and thus be able to automate it when building both apks)?

I tried to generate an apk that would work for both Quest 2 and Android but got the following error on the adb console

2023-01-03 12:32:59.297 15363-15435/? E/Unity: Exiting application:

    This .apk was built with the Oculus XR Plugin loader enabled, but is attempting to run on a non-Oculus device.
    To build for general Android devices, please disable the Oculus XR Plugin before building the Android player.

    Unity.XR.Oculus.OculusLoader:RuntimeLoadOVRPlugin()

What I expect to happen is that it can be executed on both platforms since my intention is that Unity itself separates (with my own script) both platforms in different scenes.


问:
ReactNative [iOS] inquiry -> adding compassViewPosition in MapboxGL.MapView prop terminates the app, thoughts please?
I'm currently experiencing this issue https://github.com/rnmapbox/maps/issues/2514
wherein inside my code mapbox component, if compassViewPosition is added, it terminates the app without even throwing an error.  anyone else encountered something related to this (read, passed through or dreamt about); feel free to comment out. Happy to get enlightened here.

```<code>import React from 'react';
import MapboxGL from '@rnmapbox/maps';

class BugReportExample extends React.Component {
  render() {
    return (
            <MapboxGL.MapView
                compassViewPosition={3}  // adding this line terminates the app (not tested in android yet, and no error from try catch)
            />
    );
  }
}
</code>```

I'm in "react-native": "~0.66.5" and I'm using "@rnmapbox/maps": "rnmapbox/maps#main",

Previous package I'm using was "@react-native-mapbox-gl/maps": "^8.5.0" and it works fine here. I'm trying to upgrade to the newer package (I know it's not on stable release yet but wanna know if I'm the only one experiencing this).

Body:
I'm currently experiencing this issue https://github.com/rnmapbox/maps/issues/2514
wherein inside my code mapbox component, if compassViewPosition is added, it terminates the app without even throwing an error.  anyone else encountered something related to this (read, passed through or dreamt about); feel free to comment out. Happy to get enlightened here.

import React from 'react';
import MapboxGL from '@rnmapbox/maps';

class BugReportExample extends React.Component {
  render() {
    return (
            <MapboxGL.MapView
                compassViewPosition={3}  // adding this line terminates the app (not tested in android yet, and no error from try catch)
            />
    );
  }
}

I'm in "react-native": "~0.66.5" and I'm using "@rnmapbox/maps": "rnmapbox/maps#main",

Previous package I'm using was "@react-native-mapbox-gl/maps": "^8.5.0" and it works fine here. I'm trying to upgrade to the newer package (I know it's not on stable release yet but wanna know if I'm the only one experiencing this).


问:
unable to use Upsert while creating Glue Job
AWS Glue service says Unable to derive physical location of the redshift table while using the upsert option while creating a Glue Job . However while using insert it works fine .

I have tried Insert and it works fine while for upsert it says Unable to derive physical location of the redshift table..


问:
My CSS grid < grid-template-columns: repeat( auto-fit, minmax(0.7rem, 2rem, 4rem) ) !important; > isn't working!! (For responsiveness.)
I was watching this video by Web Dev Simplified by YT (At 12:20 in the video), I was already using grid in my project, and tried to implement auto-fit but didn't work!!
I tried implementing it but all my skill icons go into a single column in the center of the skill section!!
Github link

```<code>//My skill.jsx:

import React from "react";

function Skills() {
  return (
    <>
      <section className="skills">
        <div data-aos="zoom-out-down" className="card">
          <div className="content">
            <img className="skillIcon" src="/assets/html5.svg" alt="Icon" />
            <p className="skillName">HTML</p>
          </div>
          <div className="content">
            <img className="skillIcon" src="/assets/github.svg" alt="Icon" />
            <p className="skillName">GitHub</p>
          </div>
          <div className="content">
            <img className="skillIcon" src="/assets/node.svg" alt="Icon" />
            <p className="skillName">NodeJs</p>
          </div>
          <div className="content">
            <img className="skillIcon" src="/assets/password.svg" alt="Icon" />
            <p className="skillName">Authentication</p>
          </div>
          <div className="content">
            <img className="skillIcon" src="/assets/api.svg" alt="Icon" />
            <p className="skillName">API</p>
          </div>
        </div>
      </section>
    </>
  );
}

export default Skills;

//My CSS for it:

.skills {
  height: 50vh;
  width: 100%;
  padding-top: 1.8rem;
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: gradient 7s ease infinite;
  overflow: hidden;
  display: grid !important;
  grid-template-columns: repeat(
    auto-fit,
    minmax(0.7rem, 2rem, 4rem)
  ) !important;
}
.card {
  display: grid;
  grid-template-columns: repeat(5, auto);
}

.skillIcon,
.skillName {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 3rem;
  width: 2.5rem;
  margin: 1rem auto;
}
</code>```

I wanna implement the:
grid-template-columns: repeat(auto-fit,minmax(0.7rem, 2rem, 4rem));

Body:
I was watching this video by Web Dev Simplified by YT (At 12:20 in the video), I was already using grid in my project, and tried to implement auto-fit but didn't work!!
I tried implementing it but all my skill icons go into a single column in the center of the skill section!!
Github link

//My skill.jsx:

import React from "react";

function Skills() {
  return (
    <>

HTML

GitHub

NodeJs

Authentication

API

    </>
  );
}

export default Skills;

//My CSS for it:

.skills {
  height: 50vh;
  width: 100%;
  padding-top: 1.8rem;
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: gradient 7s ease infinite;
  overflow: hidden;
  display: grid !important;
  grid-template-columns: repeat(
    auto-fit,
    minmax(0.7rem, 2rem, 4rem)
  ) !important;
}
.card {
  display: grid;
  grid-template-columns: repeat(5, auto);
}

.skillIcon,
.skillName {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 3rem;
  width: 2.5rem;
  margin: 1rem auto;
}

I wanna implement the:
grid-template-columns: repeat(auto-fit,minmax(0.7rem, 2rem, 4rem));


问:
MSAL.NET acquire access token using windows credentials
We have a hybrid Active Directory scenario - an on premises Active Directory server synced with an Azure AD tenant.

We are in the process of migrating our on premise Exchange email accounts to 365.

We have a SPA (JavaScript) that displays calendar events retrieved from a dotnet core web API.

The web API only allows access to users in a specific AD group.

The SPA uses the Fetch API to call the web API with credentials.

The web API currently uses EWS to connect to our on premise Exchange server to read calendar events, using its app pool identity.

The above systems have been developed in-house and run on our internal servers.

We want to update the Web API to read calendar events using the MS Graph API, on behalf of the user. We would like to use the simplest available solution.

We have tried to use the AcquireTokenByIntegratedWindowsAuth method but receive the following error: 'Integrated Windows Auth is not supported for managed users'. My limited understanding of why this doesn't work is because we do not have an ADFS on premise.

One of the Microsoft samples shows a SPA acquiring an access token and passing the token in the header as part of the web API call. This would require us to update the SPA and web API code. We're willing to do that if it's the only solution, but I am hoping someone might offer an alternative where we only need to update the web API.


问:
Prevent merge of elements when they are unique
I'm using TinyMCE 6 and I've created a custom block insert using a
, and for the most part this is working great. However, if I have several and position the cursor in front of one of the blocks and hit backspace, it then merges all the contained
 into a single
. I've tried using attributes like data-id, id, name etc but Tiny simply discards this data from one of the elements and does the merge anyway. If I use a random number as a class name, they do not merge so this is a workaround.

For reference, the blocks are set as noneditable (I have a double-click handler configured for a custom function), so I don't see why it would try and merge them anyway.

Any ideas?

Here's a snippet of HTML as it should be:

Mmm Cookies$MONEY$$$$$$

SOMEJATEXT

Mmm Cookies$495

SOMEJATEXT

```
<p>And some that ended up:</p>
<pre class="lang-html prettyprint-override"><code><ul id="123" class="leaders mceNonEditable">
<li class="item-en text_gold"><span>Mmm Cookies</span><span>$MONEY$$$$$$</span></li>
<li class="item-ja"><span>SOMEJATEXT</span></li>
<li class="item-en"><span>Mmm Cookies</span><span>$495</span></li>
<li class="item-ja"><span>SOMEJATEXT</span></li>
</ul>
</code>```

Body:
I'm using TinyMCE 6 and I've created a custom block insert using a
, and for the most part this is working great. However, if I have several and position the cursor in front of one of the blocks and hit backspace, it then merges all the contained
 into a single
. I've tried using attributes like data-id, id, name etc but Tiny simply discards this data from one of the elements and does the merge anyway. If I use a random number as a class name, they do not merge so this is a workaround.

For reference, the blocks are set as noneditable (I have a double-click handler configured for a custom function), so I don't see why it would try and merge them anyway.

Any ideas?

Here's a snippet of HTML as it should be:

Mmm Cookies$MONEY$$$$$$

SOMEJATEXT

Mmm Cookies$495

SOMEJATEXT

And some that ended up:

Mmm Cookies$MONEY$$$$$$

SOMEJATEXT

Mmm Cookies$495

SOMEJATEXT


问:
What is the format of filesize returned by react-native-image-picker in response.filesize. Is it in bytes or bits?
What is the format of filesize returned by react-native-image-picker in response.filesize. Is it in bytes or bits?

Check the below code:

```<code>try{
  let options = {
    mediaType: 'photo',
    maxWidth: 1280,
    maxHeight: 720,
    quality: .5,
    includeBase64:true
  };

   const reso = launchImageLibrary(options, (response) => {
    console.log('Response = ', response);

    if (response.didCancel) {
      alert('User cancelled camera picker');
      return;
    } else if (response.errorCode == 'camera_unavailable') {
      alert('Camera not available on device');
      return;
    } else if (response.errorCode == 'permission') {
      alert('Permission not satisfied');
      return;
    } else if (response.errorCode == 'others') {
      alert(response.errorMessage);
      return;
    }
    // console.log('base64 -> ', response.assets[0].base64);
    console.log('uri -> ', response.assets[0].uri);
    console.log('width -> ', response.assets[0].width);
    console.log('height -> ', response.assets[0].height);
    console.log('fileSize -> ', response.assets[0].fileSize);
    console.log('type -> ', response.type);
    console.log('fileName -> ', response.fileName);
    console.log("base 64 length ",response.assets[0].base64.length)
    setCompressedImage(response.assets[0].uri)

  });
</code>```

I want to know the file size here.

The value of response.assets[0].fileSize is 484908. Is it in bytes or what?

Body:
What is the format of filesize returned by react-native-image-picker in response.filesize. Is it in bytes or bits?

Check the below code:

try{
  let options = {
    mediaType: 'photo',
    maxWidth: 1280,
    maxHeight: 720,
    quality: .5,
    includeBase64:true
  };

   const reso = launchImageLibrary(options, (response) => {
    console.log('Response = ', response);

    if (response.didCancel) {
      alert('User cancelled camera picker');
      return;
    } else if (response.errorCode == 'camera_unavailable') {
      alert('Camera not available on device');
      return;
    } else if (response.errorCode == 'permission') {
      alert('Permission not satisfied');
      return;
    } else if (response.errorCode == 'others') {
      alert(response.errorMessage);
      return;
    }
    // console.log('base64 -> ', response.assets[0].base64);
    console.log('uri -> ', response.assets[0].uri);
    console.log('width -> ', response.assets[0].width);
    console.log('height -> ', response.assets[0].height);
    console.log('fileSize -> ', response.assets[0].fileSize);
    console.log('type -> ', response.type);
    console.log('fileName -> ', response.fileName);
    console.log("base 64 length ",response.assets[0].base64.length)
    setCompressedImage(response.assets[0].uri)

  });

I want to know the file size here.

The value of response.assets[0].fileSize is 484908. Is it in bytes or what?


问:
In Node, why fs.mkdir can't set proper directory rights and fs.chmod can ?? (on group write permission)
I'm facing a strange behavior, I can't set directory rights in Node when I'm using fs.mkdir, but I can when I'm using fs.chmod. It occurs on group write permission. I can't understand why.

```<code>fs.mkdirSync("test1")
fs.mkdirSync("test2",0o700)
fs.mkdirSync("test3",0o770)
fs.mkdirSync("test4",0o770)
fs.chmod('test4', 0o770, (err) => {
  if (err) throw err;
  console.log('The permissions for file have been changed!');
});
> The permissions for file have been changed!
</code>```

Here is the result of ls -l :

```<code>total 16
drwxr-xr-x 2 doom firstGrp 4096 janv.  3 11:12 test1
drwx------ 2 doom firstGrp 4096 janv.  3 11:12 test2
drwxr-x--- 2 doom firstGrp 4096 janv.  3 11:12 test3
drwxrwx--- 2 doom firstGrp 4096 janv.  3 11:12 test4
</code>```

Thanks for your help !

Body:
I'm facing a strange behavior, I can't set directory rights in Node when I'm using fs.mkdir, but I can when I'm using fs.chmod. It occurs on group write permission. I can't understand why.

fs.mkdirSync("test1")
fs.mkdirSync("test2",0o700)
fs.mkdirSync("test3",0o770)
fs.mkdirSync("test4",0o770)
fs.chmod('test4', 0o770, (err) => {
  if (err) throw err;
  console.log('The permissions for file have been changed!');
});
> The permissions for file have been changed!

Here is the result of ls -l :

total 16
drwxr-xr-x 2 doom firstGrp 4096 janv.  3 11:12 test1
drwx------ 2 doom firstGrp 4096 janv.  3 11:12 test2
drwxr-x--- 2 doom firstGrp 4096 janv.  3 11:12 test3
drwxrwx--- 2 doom firstGrp 4096 janv.  3 11:12 test4

Thanks for your help !


问:
Panel for Python how to change Gauge colors and layout to be a semicircle
I am using Panel framework from https://panel.holoviz.org in order to generate graphs in Python. I have generated a Gauge chart using the code form https://panel.holoviz.org/reference/panes/ECharts.html.

My code:

```<code>import panel as pn
pn.extension('echarts')

def main:
    gauge = {
        'tooltip': {
            'formatter': '{a} <br/>{b} : {c}%'
        },
        'series': [
            {
            'name': 'Incidents',
            'type': 'gauge',
            'detail': {'formatter': '{value}%'},
            'data': [{'value': 50, 'name': f'Stable'}]
            }
        ]
    }
    gauge_pane = pn.pane.ECharts(gauge, width=400, height=400)
    gauge_pane.save(filename="incidents.png")

if __name__ == '__main__':
    main()
</code>```

This results in the following gauge graph

However, I want it to be a semicircle that is colorful, like this:

How can I edit the graph in such a way that it is more like that I want?

Body:
I am using Panel framework from https://panel.holoviz.org in order to generate graphs in Python. I have generated a Gauge chart using the code form https://panel.holoviz.org/reference/panes/ECharts.html.

My code:

import panel as pn
pn.extension('echarts')

def main:
    gauge = {
        'tooltip': {
            'formatter': '{a}
{b} : {c}%'
        },
        'series': [
            {
            'name': 'Incidents',
            'type': 'gauge',
            'detail': {'formatter': '{value}%'},
            'data': [{'value': 50, 'name': f'Stable'}]
            }
        ]
    }
    gauge_pane = pn.pane.ECharts(gauge, width=400, height=400)
    gauge_pane.save(filename="incidents.png")

if __name__ == '__main__':
    main()

This results in the following gauge graph

However, I want it to be a semicircle that is colorful, like this:

How can I edit the graph in such a way that it is more like that I want?


问:
Deploying Firebase Emulator on EC2 Instance
I have a deployed test environment - https://footystats.dev/#/features that I want connecting to the firebase emulator suite for the authentication service.

However when trying to use the UI on port 4000 I am having issues with 3 network requests:

http://172.31.40.139:9099/identitytoolkit.googleapis.com/v1/projects/play-on-dev/accounts:query

http://172.31.40.139:9099/identitytoolkit.googleapis.com/v2/projects/play-on-dev/tenants

http://172.31.40.139:9099/emulator/v1/projects/play-on-dev/config

However this call is working:

http://costagiannakopoulos.com/api/config

Please can anyone advise if I am missing something easy as Iv wasted hours and seem to be going round in circles.

When I run firebase locally so everything is running on localhost it works as expected.

In my attempt to get this working I have set up an EC2 instance with NGINX running as a reverse proxy.

I have created the following domain and subdomain:

http://costagiannakopoulos.com

https://auth.costagiannakopoulos.com

My firebase.json is configured like this:

```<code>{
  "emulators": {
    "auth": {
      "host": "172.31.40.139",
      "port": 9099
    },
    "ui": {
      "enabled": true,
      "host": "172.31.40.139",
      "port": 4000
    },
    "hub": {
      "enabled": true,
      "host": "172.31.40.139",
      "port": 4400
    },
    "logging": {
      "enabled": true,
      "host": "172.31.40.139",
      "port": 4501
    },
    "singleProjectMode": true
  }
}
</code>```

The IP host is pointing to the private ip on the EC2 instance.

My NGING config for emulator UI looks like this:

```<code>server {
    listen 80;
    server_name costagiannakopoulos.com;

    location / {
        proxy_pass http://172.31.40.139:4000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}
</code>```

And the NGINX config for authentication looks like this:

```<code>`server {
    listen 80;
    server_name auth.costagiannakopoulos.com;
    return 301 https://$server_name$request_uri;
}

server {
    listen 443 ssl;
    server_name auth.costagiannakopoulos.com;
    ssl_certificate /etc/letsencrypt/live/auth.costagiannakopoulos.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/auth.costagiannakopoulos.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

    location / {
        proxy_pass http://172.31.40.139:9099;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}`
</code>```

When hitting this url http://costagiannakopoulos.com/api/config I get this response:

```<code>    {
    "auth": {
        "host": "172.31.40.139",
        "listen": [
            {
                "address": "172.31.40.139",
                "family": "IPv4",
                "port": 9099
            }
        ],
        "name": "auth",
        "port": 9099
    },
    "hub": {
        "host": "172.31.40.139",
        "listen": [
            {
                "address": "172.31.40.139",
                "family": "IPv4",
                "port": 4400
            }
        ],
        "name": "hub",
        "port": 4400
    },
    "logging": {
        "host": "172.31.40.139",
        "listen": [
            {
                "address": "172.31.40.139",
                "family": "IPv4",
                "port": 4501
            }
        ],
        "name": "logging",
        "port": 4501
    },
    "ui": {
        "host": "172.31.40.139",
        "listen": [
            {
                "address": "172.31.40.139",
                "family": "IPv4",
                "port": 4000
            }
        ],
        "name": "ui",
        "pid": 26141,
        "port": 4000
    }
}
</code>```

Thanks
Costa

Body:
I have a deployed test environment - https://footystats.dev/#/features that I want connecting to the firebase emulator suite for the authentication service.

However when trying to use the UI on port 4000 I am having issues with 3 network requests:

http://172.31.40.139:9099/identitytoolkit.googleapis.com/v1/projects/play-on-dev/accounts:query

http://172.31.40.139:9099/identitytoolkit.googleapis.com/v2/projects/play-on-dev/tenants

http://172.31.40.139:9099/emulator/v1/projects/play-on-dev/config

However this call is working:

http://costagiannakopoulos.com/api/config

Please can anyone advise if I am missing something easy as Iv wasted hours and seem to be going round in circles.

When I run firebase locally so everything is running on localhost it works as expected.

In my attempt to get this working I have set up an EC2 instance with NGINX running as a reverse proxy.

I have created the following domain and subdomain:

http://costagiannakopoulos.com

https://auth.costagiannakopoulos.com

My firebase.json is configured like this:

{
  "emulators": {
    "auth": {
      "host": "172.31.40.139",
      "port": 9099
    },
    "ui": {
      "enabled": true,
      "host": "172.31.40.139",
      "port": 4000
    },
    "hub": {
      "enabled": true,
      "host": "172.31.40.139",
      "port": 4400
    },
    "logging": {
      "enabled": true,
      "host": "172.31.40.139",
      "port": 4501
    },
    "singleProjectMode": true
  }
}

The IP host is pointing to the private ip on the EC2 instance.

My NGING config for emulator UI looks like this:

server {
    listen 80;
    server_name costagiannakopoulos.com;

    location / {
        proxy_pass http://172.31.40.139:4000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

And the NGINX config for authentication looks like this:

`server {
    listen 80;
    server_name auth.costagiannakopoulos.com;
    return 301 https://$server_name$request_uri;
}

server {
    listen 443 ssl;
    server_name auth.costagiannakopoulos.com;
    ssl_certificate /etc/letsencrypt/live/auth.costagiannakopoulos.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/auth.costagiannakopoulos.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

    location / {
        proxy_pass http://172.31.40.139:9099;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}`

When hitting this url http://costagiannakopoulos.com/api/config I get this response:

    {
    "auth": {
        "host": "172.31.40.139",
        "listen": [
            {
                "address": "172.31.40.139",
                "family": "IPv4",
                "port": 9099
            }
        ],
        "name": "auth",
        "port": 9099
    },
    "hub": {
        "host": "172.31.40.139",
        "listen": [
            {
                "address": "172.31.40.139",
                "family": "IPv4",
                "port": 4400
            }
        ],
        "name": "hub",
        "port": 4400
    },
    "logging": {
        "host": "172.31.40.139",
        "listen": [
            {
                "address": "172.31.40.139",
                "family": "IPv4",
                "port": 4501
            }
        ],
        "name": "logging",
        "port": 4501
    },
    "ui": {
        "host": "172.31.40.139",
        "listen": [
            {
                "address": "172.31.40.139",
                "family": "IPv4",
                "port": 4000
            }
        ],
        "name": "ui",
        "pid": 26141,
        "port": 4000
    }
}

Thanks
Costa


问:
jupyterlab: spliting a notebook into several notebooks, how to import same python librairies (modules) for each notebook?
Context :

A notebook becomes too long.

This notebook is split into several notebooks

At the top of each notebook, same python libraries should be imported, like pandas, scipy, etc ... via a long list of import command lines

Problem :

At one moment, working on one of the notebook, importation of a new module could be necessary. Then, this import modification should also be written on other notebooks.

When there are several notebooks to modify, this way to organize same python modules imports, one's could easily forget to write modifications on all notebooks.

What I tried :

from a python file import : I created a python file containing all modules importations needed (called imports_needed.py) and at top of notebook I run the command from imports_needed import *. This goes to an error when I call on of the imported module. Example : if import pandas as pd is written on imports_needed.py , then launching a cell calling pd returns an error

sharing kernel : I created, run, and saved a notebook containing all imports needed, "nb_imports_needed.ipynb". Then I created other notebooks, and, for each of those notebooks, I selected, in kernel menu (change kernel ...), the kernel of "nb_imports_needed.ipynb". This works fine. But I'm wandering if it is the right way to do it.

Question :

Is there a way , or what is the best way, to call same python modules for several jupyterlab notebooks of a same project ?


问:
What is the difference between "+=" operator and normal adding when implementing a residual connection in pytorch?
I was trying to create a Transformer Encoder Block and in the forward() function i used "+=" operator:

```<code>    def forward(self, x):
        x += self.msa_block(x)
        x += self.mlp_block(x)

        return x
</code>```

Then i got an error message:

```<code>RuntimeError: one of the variables needed for gradient computation has been modified
by an inplace operation: [torch.FloatTensor [32, 197, 768]], which is output 0 of AddBackward0, is at version 24; expected version 23 instead.
Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).
</code>```

After some search and trial-error i found out that the forward() function should be like this:

```<code>    def forward(self, x):
        x = self.msa_block(x) + x
        x = self.mlp_block(x) + x

        return x
</code>```

As i understood, the problem was gradient computing(backward()). My question is what caused gradient not compute?

Body:
I was trying to create a Transformer Encoder Block and in the forward() function i used "+=" operator:

    def forward(self, x):
        x += self.msa_block(x)
        x += self.mlp_block(x)

        return x

Then i got an error message:

RuntimeError: one of the variables needed for gradient computation has been modified
by an inplace operation: [torch.FloatTensor [32, 197, 768]], which is output 0 of AddBackward0, is at version 24; expected version 23 instead.
Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).

After some search and trial-error i found out that the forward() function should be like this:

    def forward(self, x):
        x = self.msa_block(x) + x
        x = self.mlp_block(x) + x

        return x

As i understood, the problem was gradient computing(backward()). My question is what caused gradient not compute?


问:
load model with TensorFlow java api, occurs data loss: not an sstable (bad magic number) exception
I use SavedModelBundle.load(finalPath, "serve") to load the model

I tried to replace files starting with 'model.ckpt' with 'variables'  and it didn't work.

exception detail:

```<code>2023-01-03 19:38:42.826754: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at save_restore_v2_ops.cc:184 : Data loss: not an sstable (bad magic number)
2023-01-03 19:38:42.827499: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at save_restore_v2_ops.cc:184 : Data loss: not an sstable (bad magic number)
2023-01-03 19:38:42.827582: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at save_restore_v2_ops.cc:184 : Data loss: not an sstable (bad magic number)
2023-01-03 19:38:42.827619: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at save_restore_v2_ops.cc:184 : Data loss: not an sstable (bad magic number)
2023-01-03 19:38:42.843372: I tensorflow/cc/saved_model/loader.cc:291] SavedModel load for tags { serve }; Status: fail. Took 159800 microseconds.
19:38:42.879 [main] ERROR c.a.h.x.m.p.MosMemoPublication - load model exceptionorg.tensorflow.TensorFlowException: not an sstable (bad magic number)
[[Node: save_1/RestoreV2_3 = RestoreV2[_output_shapes=[<unknown>, <unknown>, <unknown>, <unknown>, <unknown>, ..., <unknown>, <unknown>, <unknown>, <unknown>, <unknown>], dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save_1/Const_0_0, save_1/RestoreV2_3/tensor_names, save_1/RestoreV2_3/shape_and_slices)]]```
```

Body:
I use SavedModelBundle.load(finalPath, "serve") to load the model

I tried to replace files starting with 'model.ckpt' with 'variables'  and it didn't work.

exception detail:

2023-01-03 19:38:42.826754: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at save_restore_v2_ops.cc:184 : Data loss: not an sstable (bad magic number)
2023-01-03 19:38:42.827499: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at save_restore_v2_ops.cc:184 : Data loss: not an sstable (bad magic number)
2023-01-03 19:38:42.827582: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at save_restore_v2_ops.cc:184 : Data loss: not an sstable (bad magic number)
2023-01-03 19:38:42.827619: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at save_restore_v2_ops.cc:184 : Data loss: not an sstable (bad magic number)
2023-01-03 19:38:42.843372: I tensorflow/cc/saved_model/loader.cc:291] SavedModel load for tags { serve }; Status: fail. Took 159800 microseconds.
19:38:42.879 [main] ERROR c.a.h.x.m.p.MosMemoPublication - load model exceptionorg.tensorflow.TensorFlowException: not an sstable (bad magic number)
[[Node: save_1/RestoreV2_3 = RestoreV2[_output_shapes=[<unknown>, <unknown>, <unknown>, <unknown>, <unknown>, ..., <unknown>, <unknown>, <unknown>, <unknown>, <unknown>], dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save_1/Const_0_0, save_1/RestoreV2_3/tensor_names, save_1/RestoreV2_3/shape_and_slices)]]```