how can we use pusher alternative peatio-slanger

Hello @bitcoinli,
I can help you refactor existing Peatio code to use open source pusher alternatives.
You can always reach me at<EMAIL_ADDRESS>Best,
Oskar

hello
get a new server and point a subdomain to that server's ip
issue a SSL certificate using a tool like certbot
run slanger as a service with the required paramters
choose any arbitrary PUSHER_APP number
that's it :)

Hi muhammednagy,
Can we issue SSL on ip address. Because i am running peatio on bear ip address and do not have domain name. Can you pls help on how to issue SSL for ip address where i wud like to run slanger?

Try an Anti Scammer method to run both on the same server, IP or Domain.
See https://github.com/rbenv/rbenv#rbenv-versions
Install Ruby version for Peatio and ignore the command "rbenv global .... "
Install Ruby version for Slanger and ignore the command "rbenv global .... "
Browse to /home/deploy/peatio and type rbenv local number
Browse to /home/deploy/slanger and type rbenv local number
Update configuration in Nginx
See https://gist.github.com/janx/7af0c563d0b65e1de197 and
http://nginx.org/en/docs/http/websocket.html
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream appserver {
server <IP_ADDRESS>:9222; # appserver_ip:ws_port
}
server {
listen 8888; // client_wss_port
ssl on;
ssl_certificate /path/to/crt;
ssl_certificate_key /path/to/key;

location / {
    proxy_pass http://appserver;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
}

}
Run Slanger first then Peatio to avoid errors.


updated: boilerplate files in test folder, Dockerfile to include curl

… version

please test this

Please test this

please test this

test this please

@geojaz he is no longer with helmsman, we need to update this PR ourselves

Closing, Kristen will assign this to someone


Update text for FIG.

This includes documenting decisions about design and implementation as well as tying the design to FAFF requirements and providing some estimates for remaining work.

Superseded by the 2024 update.


Combine primitives

This is worth an initial look and some testing while I add tests for everything.
This pull request contains a few things:

Re-adds combine primitives, closing out #108 and by proxy #85 and #103.
Splits out some primitive helper functions from combineNodes into PrimitiveHelpers.
Removes underscore usage #160.
mergeBuffers will no longer fail if the new buffer name is the same as an already existing one.
Fixes an error in removeDuplicatePrimitives.removePrimitivesFromMesh
Adds a second pass of light optimization

Some preliminary testing with the buggy model:

Original
Master
Master w/ combine primitives

File size
10,414 KB
6,091 KB
6,046 KB

Nodes
208
179
179

Meshes
109
163
68

Draw Calls
236
273
236

Looks great! I did some simple testing and it seems to work well.

@lasalvavida can you verify that it makes sense for the buggy model to have 95 fewer meshes, but only 37 fewer draw calls?

@pjcozzi Master currently bloats the number of meshes in cases where two meshes that are in node endpoints that can't be combined contain identical primitives. That is what drives up the draw call count. The output with this PR removes that bloating by recombining meshes after primitives get combined.
tl;dr It has the same number of draw calls as the version in the sampleModels, the current output of master is adding more unnecessary draw calls.

Gotcha.

@lasalvavida Is there more to do for this? The latest merge commit has a few issues.

There was a bad merge; it still needs tests. I'll add those now.

@lilleyse This is updated and ready for a look

@lilleyse, I've done some cleanup here to get this in line with master again, and I've pulled the createAccessor utility from the hard-normals branch to simplify the code a bit. I've tested a few models, and everything looks good on my end. Let me know if there's anything else that needs to be done here before merging.

I'll finish reviewing this soon.
Not super relevant to this PR, but does the second mergeDuplicateVertices call in Pipeline.processJSONWithExtras have much effect anymore? It would be great if we could remove that one if possible to help improve performance.

I have removed the second mergeDuplicateVertices call. With the light optimization, it is no longer needed; the files produced with and without it are the same size.

@lilleyse will you be able to review this soon?  We have a lot of open PRs in this branch and I would like to get them merged.

Yes I will review this today.

Thanks for the update @lasalvavida
It's been a while since I looked at this so fill me in case my comments don't make sense. I'll do some testing tomorrow.

I'm having issues converting this model:
dragon_low.gltf.txt

This is ready for review. Referring to my original benchmarks the stats are now:

Original
Master
Master w/ combine primitives

File size
10,414 KB
6,091 KB
6,023 KB

Nodes
208
179
179

Meshes
109
163
61

Draw Calls
236
273
196

This is really close. Every model I've tested works fine. Those numbers are nice!

Updated

Nice, I'm glad to finally get this in! Also because of adjustments here the pipeline just runs a lot faster.


ALPN Issue On Android Device （Netty Http2 Server）

background:
We are trying to use the Netty server based on http2 (SSL) to our Android project, and we plan to run the server on the Android device.Use this device as a routing node for other terminals in the LAN. We have implemented ssl in the current situation, but we have encountered problems with the ALPN configuration.
I have referenced a lot of information about Http2 ALPN on google, but almost all of them are configuration information on the web side, did not find anything about Android (maybe this case is relatively rare)
This problem has been bothering me for many days, and now the most urgent thing is how to use Android Studio /Gradle tools,
Configure the ALPN item correctly and implement Http2.
Any help would be greatly appreciated. Thanks!
Expected behavior
Run Netty Http2 server on Android Device
Actual behavior
We are having trouble configuring ALPN on Android Studio.
Steps to copy
Refer to the official example on Netty-http2, using Keystore type BKS instead of JKS. ALPN config problems are prone to
Mesh version
4.1.5.Final
JVM version (e.g. java -version)
openjdk version 1.8.0_202
Operating system version (e.g. uname -a)
Android Device 9.0
eg:
I try to config alpn like below,but nothing help.

Did you take a look at HTTP/2 Examples?

Did you take a look at HTTP/2 Examples?

Yes. That's the first things i had done , but when i config the sslcontext and run the server on android device ,i got the alpn issue. I sure that this issue come from Http2ServerInitializer-->configureSsl-->sslCtx.newHandler(ch.alloc()).
I then searched Google for a lot of information about the alpn configuration and how it works on android devices, but I couldn't find anything of value, so I had to ask you for help here.

Show me SslContextBuilder code

Show me SslContextBuilder code

Hi hyperxpro, this is SslContextBuilder's code and it also refer from HTTP/2 Examples.

and once i use following code to configure ssl , ALPN exceptions must appear.

I have no idea. Any help would be greatly appreciated. Thanks!

Sorry I have no idea about android... maybe @ejona86 knows ?

Jetty's ALPN boot is only for OpenJDK; it isn't possible to use it on Android (there is no -Xbootclasspath). Using it compile-time does nothing; it is supposed to be used at runtime.
Android uses Conscrypt. But there's three different Conscrypt instances: the one provided as part of the OS (on non-ancient devices), the one provided by Google Play Services Dynamic Security Provider (and thus should be preferred over the OS one because it is more up-to-date), and Conscrypt itself. Their respective package names are com.android.org.conscrypt, com.google.android.gms.org.conscrypt, org.conscrypt.
org.conscrypt is available on OpenJDK as well. This is the version that Netty supports. Using org.conscrypt on Android is possible, but rarer, as it is large (MBs). I typically only see people discussing using it for China-deployed apps, since Google Play Services isn't available there. You could deploy org.conscrypt:conscrypt-android with your app and it would work.
Starting in Android 10, Android added the "Java 9 ALPN APIs." Conscrypt supports those APIs when the system supports them. So in Android 10+ you could use Netty with the OS-provided Conscrypt or the Google-Play-Services Conscrypt.

@ejona86
Thanks for your important answer. I believe this information will be of great help to my problems which I have meet. At this moment,I had took the alternative and switch to the HTTP1.1 scenario for the time being. Once I finish the urgent matters at hand, I will go back to study using Conscrypt to realize ALPN scheme according to the information you provided. Thanks again for your help !

I think we can close this for now


Bug: Windows executable file runs with errors

Version: 2.1.6
Traceback:
Traceback (most recent call last):
  File "main.py", line 4, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "arknights_mower\__main__.py", line 6, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "arknights_mower\command.py", line 4, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "arknights_mower\solvers\__init__.py", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "arknights_mower\solvers\base_construct.py", line 8, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "arknights_mower\utils\character_recognize.py", line 13, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "arknights_mower\ocr\__init__.py", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "arknights_mower\ocr\model.py", line 11, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "arknights_mower\ocr\dbnet.py", line 5, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "arknights_mower\ocr\decode.py", line 4, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "shapely\geometry\__init__.py", line 4, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "shapely\geometry\base.py", line 19, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "shapely\coords.py", line 8, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "shapely\geos.py", line 164, in <module>
  File "shapely\geos.py", line 60, in load_dll
OSError: Could not find lib geos_c.dll or load any of its variants [].
[24420] Failed to execute script 'main' due to unhandled exception!

fixed in 90f03aea31886cb7b39e9d4831c7a0c9402b00d0


MINOR: Doc individual partition must fit on the server that host it

@here Guys, this is a simple change, please correct me if I am wrong.

LGTM except one minor comment. cc @ijuma @gwenshap .

Same as what @guozhangwang said.

@guozhangwang @ijuma let's merge this, or we waiting for some more discussion ?

Merged to trunk.


Replace libjpeg-turbo with mozjpeg

According to this PR comments, mozjpeg now performs as well as libjpeg-turbo when not using specific options, and is now the recommended implementation: https://github.com/libvips/libvips/pull/2995

Hey @renchap!
mozjpeg with the default param values produces the same result as libjpeg-turbo. Since OSS version of imgproxy does not allow redefining mozjpeg params, replacing libjpeg-turbo with mozjpeg doesn't seem to have any sense.


Allow running without disabling SIP - suggestion included

https://poweruser.blog/using-dtrace-with-sip-enabled-3826a352e64b - not sure if this mechanism could be used?
Failing that, I gather there is some other sandboxing mechanism (relying on the Sandboxing frameworks, akin to using the officially-deprecated sandbox-exec) that might be usable, but obviously this work is heavily chroot based.

I'm not reproducing what that guy shows (though I'm on Ventura). If I try to execute binaries after codesign --remove-signature (both within and outside of chroot), I just get killed, without any traces in dmesg, even with SIP disabled.

I think the instant killing in the chroot from this comment might be due to Launch Constraints. I'm not sure exactly how one would remove those, but it would likely involve removing the codesigning from the binary, and possibly changing the file's contents/checksum, in case the binary has it's signature stored detached in the read only volume.


add other affliates to lang map

for auth flow needs to hide/show certain fields based on country codes.
UK and CA should be added to the lang map variable
should they be global english as language?
refs #5052 #5085
cc: @blisteringherb @mshmsh5000

I'm not clear on why this is a Global 1.0 task, since UK and CA are out of scope and still have their own sites.

en-gb
en-ca
fr-ca

Especially given Canada's two languages, I don't think we want to touch this right now.

@mshmsh5000 If we want to hide/show specific fields in the auth flow, I think it will be easier to have this stuff in the strongarm so @sbsmith86 can call one function to check countries, instead of creating an array of country codes
I don't think we need to define roles, or permissions or the language, just the country if we want the auth flow to show different things.

Got it, got it. :+1:


Split parquet schema mismatch

Part of https://github.com/huggingface/datasets-server/issues/1443
We have 11 cache records for split-first-rows-from-parquet because of ArrowInvalid when split parquets have a different schema.
See

This PR contains:

Intercept ArrowInvalid exception when trying to concatenate shared parquet files in parquet_utils.py
Separated tests from test_rows.py to test_response.py and test_parquet_utils.py since there was not a specific rows logic inside.
Added a test in test_parquet_utils.py to simulate schema mismatch error.

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

Comparison is base (62f589b) 90.50% compared to head (8704060) 87.33%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2124      +/-   ##
==========================================
- Coverage   90.50%   87.33%   -3.18%
==========================================
  Files         249      131     -118
  Lines       15260     4911   -10349
==========================================
- Hits        13811     4289    -9522
+ Misses       1449      622     -827

Flag
Coverage Δ

jobs_cache_maintenance
95.33% <ø> (ø)

jobs_mongodb_migration
86.69% <ø> (ø)

libs_libapi
86.70% <100.00%> (?)

libs_libcommon
?

services_admin
86.56% <ø> (ø)

services_api
87.09% <ø> (ø)

services_rows
82.72% <ø> (-2.78%)
:arrow_down:

services_search
80.48% <ø> (ø)

services_sse-api
94.21% <ø> (ø)

services_worker
?

Flags with carried forward coverage won't be shown. Click here to find out more.

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

By the way: in which case do we have that error?
The following datasets have this error:

mikeee/chroma-paraphrase-multilingual-mpnet-base-v2
antonkulaga/openai_6000_chunk_papers
longevity-genie/openai_6000_chunk_modules
mariosasko/test_tags
kye/all-lucidrain-code-python-tokenized-8192
jitx/distillation_code_sample
Lolz14/mine
Rami/utd_reddit
eco4cast/neon4cast-scores
texonom/md-chroma-instructor-xl
hysts-samples/sample-user-preferences

It happens when for the same split, the user provided parquet files with different columns, for instance: dataset=kye/all-lucidrain-code-python-tokenized-8192 config=default split=train has two source files but their schemas (column names) are different:

First file has: python_code, repo_name and file_path columns.
Second file has: repo_name, file_path, input_ids, attention_mask columns.

Maybe change the wording thinking in the final user. I don't think I would have understood what a "schema" is. Also, the error message should give a hint at what the user can do to fix the issue.

Maybe: "The column names of the split Parquet files do not match." ?

Maybe we can dig a bit into why this is occurring. In the case of https://huggingface.co/datasets/kye/all-lucidrain-code-python-tokenized-8192/commits/main, it seems the user wanted to replace the file, but due to the different suffix, we have two files, instead of one. The solution in that case would be to delete the first parquet file which is obsolete.
I'm not sure how we detect this is the case, and how to reflect this in the error message.
Maybe we can look at the other datasets to see if it's the same situation or another use case

The solution in that case would be to delete the first parquet file which is obsolete.

Yes, but I think it would be better to let the user fix the problem (In case we want to do it, we have be near 100% sure that the cause is an obsolete file)
The following datasets look to have the same case (trying to upload and replace a file):
https://huggingface.co/datasets/kye/all-lucidrain-code-python-tokenized-8192/commits/main
https://huggingface.co/datasets/mariosasko/test_tags/commits/main
https://huggingface.co/datasets/jitx/distillation_code_sample/commits/main
https://huggingface.co/datasets/Rami/utd_reddit/commits/main
https://huggingface.co/datasets/hysts-samples/sample-user-preferences/commits/main
I'm not sure if we should fix this issue directly on the datasets server, as it might cause unintended user actions. It might be better to update our guides to help users with update actions. We could also suggest specific fixes for certain errors. These changes should be applied to the whole datasets server, possibly in a new pull request. WDYT? I can open an issue to suggest ways for users to fix their problems. We could link each error with possible solutions to simplify issue resolution. I'm not sure if this should be implemented on the API side or the UI, or perhaps in Moonlanding.

OK. It's pretty rare, in any case (about 10 datasets out of 70K). I think we should make the error message clearer (it can be longer) so that the user has a hint that it's an issue with having incoherent files in the same split. Then, on the Hub, we propose the user to open a discussion, so, we can fix on the issues on that basis.


Many To Many self reference relationship with non-tree structure

Hello!
I need to create non-tree structure with my Users. Each user can grant access for his profile to another users.
This is my User class:
public class User
    {
        public int Id { get; set; }

        public string Email { get; set; }

        // users who can watch my profile
        public virtual ICollection<User> HavingAccessUsers { get; set; }

        // users, wich profiles are readable for me
        public virtual ICollection<User> ReadableUsers { get; set; }
    }

I don't understand, how can I do it with fluent API. I stopped by "WithOne".
 modelbuilder.Entity<User>()
                .HasMany(c => c.HavingAccessUsers)
                .WithOne(...);

This is many to many relationship which is not supported yet without join table.
See #1368 for more details.


Wrong type for 'display.background' in advancement schemas

It should allow extensions.

:tada: This issue has been resolved in version 1.3.6 :tada:
The release is available on:

Visual Studio Marketplace
GitHub release
npm package (@latest dist-tag)

Your semantic-release bot :package::rocket:


Add custom container component

[X] The existing test suites (npm test) all pass
[X] For any new features or bug fixes, both positive and negative test cases have been added
[X] For any new features, documentation has been added
[X] Format your code with prettier (yarn run prettier).
[X] Run the Flow typechecks (yarn run typecheck).
[X] For any documentation changes, the text has been proofread and is clear to both experienced users and beginners.

Hello, I would like to use react-spring with react-virtualized. To achieve animation with react-spring I should use animated.div instead of normal div. Then I can pass animation props to animated.div via containerProps. Minified example:
     const { scroll: scrollLeft } = useSpring({
        scroll: (scrollToColumn) * cellWidth,
        reset: false,
        delay: 200,
        config: config.molasses,
    })

    return (
        <VirtualGridStyled
            cellRenderer={renderCell}
            columnCount={itemsCount}
            containerComponent={animated.div}
            containerProps={{
                scrollLeft,
            }}
            scrollToAlignment="start"
            columnWidth={cellWidth}
            overscanIndicesGetter={carouselOverscanIndicesGetter}
            height={cellHeight}
            rowCount={1}
            rowHeight={cellHeight}
            width={width}
        />
    )

I added prop - containerComponent, so I can pass custom container component
Thank you

@bvaughn please make a review 😄


alert "OpenCPU connection failed"

Sometimes on pageload an alert is displayed: "Connection to OpenCPU failed: error"

This occured sometimes in firefox (ubuntu15) and safari (osx), not yet in chrome.

fixed in production for now. No commit available as it required changing the opencpu library. We will create a fork of it in the future and fix it there.


[SVCS-423] Links in pdfs should no longer open in the iframe.

Instead, they should open in a new tab/window
https://openscience.atlassian.net/browse/SVCS-423
Purpose
Fix opening links in an iframe.
Update tests to match fix.
Summary of changes
added default behavior of links to open in new tab, instead of on same page (in iframe)
Changed MFR tests to match this behavior.
QA Notes
Open a pdf that has a link in it (example on jira ticket)
Click on the link
It should redirect you in a new tab, instead of in the iframe.
Mfr pdf tests should pass

fixed. Sorta killed the commit for it when merging. Anyway, sandboxing just needed 'allow-popups'.
https://stackoverflow.com/questions/21236616/sandboxed-iframe-with-target-blank-doesnt-open-new-tab-or-window

Changes Unknown when pulling 7021488f9e1bee8d35400ff97d4cceb5a94e4807 on AddisonSchiller:feature/link-in-pdf-fix into ** on CenterForOpenScience:develop**.

yaaaaaaaaaaaaaaaaaaaay. merged.


a11y_Form> expanded> A11y> 1 incomplete is appearing

Describe the bug
Form>> "1 incomplete" is appearing for "expanded".
To Reproduce
Steps to reproduce the behavior:

Go to 'https://storybook-preview-dev--upbeat-sinoussi-f675aa.netlify.app/?path=/story/form--expanded
Click on 'Accessibility" add on
"1 incomplete" is appearing

Expected behavior
"0 incomplete" should appear for Form> expanded.
QA Note: 1 Violation & 1 Incomplete is displayed on iPad.

OS
Version
Result

Win 10 (Chrome)
102.0.5005.63
http://somup.com/c3jbQuu9UZ

Win 10 (Firefox)
101.0
http://somup.com/c3jbQuu9Ut

Win 10 (Edge)
103.0.1264.37
http://somup.com/c3jbQtu9U3

MAC (safari)
15.3
http://somup.com/c3jbQwu9Ug

Ipad (safari)
v15.1
http://somup.com/c3jbQvu9Uw

No plans to fix.


Azure Sample doesn't work for Consumption plan

https://github.com/Azure/azure-quickstart-templates/blob/master/101-function-app-create-dynamic/azuredeploy.json
The template you reference doesn't work now. The root cause is serverfarms is not requesd any more. It might work if you remove serverfarms section since the Consumption Plan is now default.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: a1ba8817-3e01-7e84-6c71-b98b131f2927
Version Independent ID: a7703386-9e83-1075-72ef-f9e63f3dc4de
Content: Automate resource deployment for a function app in Azure Functions
Content Source: articles/azure-functions/functions-infrastructure-as-code.md
Service: azure-functions
GitHub Login: @ggailey777
Microsoft Alias: glenga

Hi @TsuyoshiUshio - Thank you for your feedback! We will review and update as appropriate.

@mattchenderson can you take a look at this? Thanks!

Thank you guys. Additional information.
I'm not sure however, My account (Internal Microsoft subscription) has some limitation for specific region. I don't know if the people uses other subscription don't have a problem or serverfarm can be problem for others.  I solve this with remove serverfarm then change a region. Since I only have internal one I can't test it. Sorry.

@TsuyoshiUshio Could you clarify which specific region that you were deploying to?

@TsuyoshiUshio As you've pointed out above, it was probably subscription specific restriction. I'm able to deploy the sample successfully:

We will now proceed to close this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.


add convert conec function

Pull Request Test Coverage Report for Build 534166060

0 of 14 (0.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-1.5%) to 52.962%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/bc.jl
0
4
0.0%

src/utils.jl
0
10
0.0%

Totals

Change from base Build 534073536:
-1.5%

Covered Lines:
152

Relevant Lines:
287

💛  - Coveralls


fix upgrade from 2.6-2.7-2.8 apiservice exist issue

https://issues.redhat.com/browse/ACM-5769

/retest

/test sonar-pre-submit

/hold need rel


add map from bundle file (environment_MapName)

Add new map from bundle file. The bundle file is built by the Simulator, i.e., environment_MapName.
Usage:

Add new map from bundle file:

map_generator = MapGenerator()
bundle_file = 'environment_NewMap'
map_generator.add_map_to_sora_server(bundle_file)

Add new map from map config file:

map_generator = MapGenerator()
map_config_file = 'NewMap_config.json'
map_generator.insert_map_to_db(map_config_file)

@umdreamer thanks for the contribution! These changes look great!
I took a quick look at the code, this handles creating the preview images, correct?

@YuqiHuai Yes, this code handles everything from the bundle file to create a new map, including server/assets/map, hdmap, previews, and the mongodb data.

@umdreamer great. sounds good! I am glad you know so much about these bundles!

hi @umdreamer. thanks for your excellent work. my server has updated after using your script(from bundle), but map.json file doesn't change, so i couldn't load the map with python api. maps and hd_maps files are remains the same. do you have any suggestion?

Add new map from bundle file. The bundle file is built by the Simulator, i.e., environment_MapName.
Usage:

Add new map from bundle file:

map_generator = MapGenerator()
bundle_file = 'environment_NewMap'
map_generator.add_map_to_sora_server(bundle_file)

Add new map from map config file:

map_generator = MapGenerator()
map_config_file = 'NewMap_config.json'
map_generator.insert_map_to_db(map_config_file)

nice work,but when i try this script, an error occur "zipfile.BadZipFile: File is not a zip file".
i have build my own map via lgsvl simulator, and the output is a binary file instead of a zip file.
what should i do about this,thanks.

Hello @umdreamer,
With your custom map generator, db and client is has updated in both ways(bundle and config file).  But when i try to load map using python api, it's not work. Dou you have any suggestion about this?

Do you give the correct map id? It is not the Guid, but the cid. There are different IDs for a map.

Hi again @umdreamer,
Yes, i gave the correct id. Here is my steps, maybe we can figure out the problem:

I have successfully build the SVL's CubeTown

Used your map_generator

Client side updated.

Try to load map using api

Unity outputs for my map

Unity outputs for already existing maps

It seems that your map resource has some problem. Do you have a look whether the original CubeTown map is the same as your own build version?

you are right. i tried with the SVL's original CubeTown and SanFrancisco and its worked. actually i don't know why this error show up but i will figure out.
so thanks for kindly reply @umdreamer

Hi @umdreamer,this tool to add map is very good,I have successfully，but can you have add Vehicles from bundle file tools?


RuntimeError: CUDA error: out of memory on model instantiation when running on computing cluster

🐛 Bug
When running the provided script I get the following error:
(ganresearch) [@classt05 test]$ python oom_test.py
GPU available: True, used: True
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
.../lib/python3.8/site-packages/pytorch_lightning/trainer/configuration_validator.py:99: UserWarning: you passed in a val_dataloader but have no validation_step. Skipping val loop
  rank_zero_warn(f"you passed in a {loader_name} but have no {step_name}. Skipping {stage} loop")
initializing ddp: GLOBAL_RANK: 1, MEMBER: 2/2
initializing ddp: GLOBAL_RANK: 0, MEMBER: 1/2
----------------------------------------------------------------------------------------------------
distributed_backend=nccl
All DDP processes registered. Starting ddp with 2 processes
----------------------------------------------------------------------------------------------------

Traceback (most recent call last):
  File "oom_test.py", line 82, in <module>
    test_x(tmpdir)
  File "oom_test.py", line 78, in test_x
    trainer.fit(model=model, datamodule=dm)
  File ".../lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 553, in fit
    self._run(model)
  File ".../lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 865, in _run
    self._call_setup_hook(model)  # allow user to setup lightning_module in accelerator environment
  File ".../lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1166, in _call_setup_hook
    self.accelerator.barrier("pre_setup")
  File ".../lib/python3.8/site-packages/pytorch_lightning/accelerators/accelerator.py", line 381, in barrier
    self.training_type_plugin.barrier(name=name)
  File ".../lib/python3.8/site-packages/pytorch_lightning/plugins/training_type/ddp.py", line 350, in barrier
    torch.distributed.barrier(device_ids=self.determine_ddp_device_ids())
  File ".../lib/python3.8/site-packages/torch/distributed/distributed_c10d.py", line 2524, in barrier
    work = default_pg.barrier(opts=opts)
RuntimeError: CUDA error: out of memory

To Reproduce
I believe this is only an HPC problem, as running the code on a colab notebook does not cause the error. Here is the script:
import pytorch_lightning as pl
from pytorch_lightning import LightningDataModule
from torch.nn import functional as F
from torchvision import transforms
from torchvision.datasets import MNIST

tmpdir = '../../data'

def mnist(root: str, normalize: bool = False):
    tlist = [transforms.ToTensor()]

    if normalize:
        tlist.append(transforms.Normalize((0.5,), (0.5,)))

    transform = transforms.Compose(tlist)

    trainset = MNIST(root=root, train=True, download=True, transform=transform)
    testset = MNIST(root=root, train=False, download=True, transform=transform)
    return trainset, testset

def mnist_datamodule(data_path: str, batch_size: int, num_workers: int):
    train, val = mnist(data_path, normalize=True)
    return LightningDataModule.from_datasets(train, val, None, batch_size=batch_size, num_workers=num_workers)

import torch
from pytorch_lightning import LightningModule

class BoringModel(LightningModule):

    def __init__(self):
        super().__init__()
        self.fc1 = torch.nn.Linear(28 * 28, 32)
        self.fc2 = torch.nn.Linear(32, 10)

    def forward(self, x):
        x = torch.flatten(x, 1)
        x = F.sigmoid(self.fc1(x))
        x = F.softmax(self.fc2(x))
        return x

    def training_step(self, batch, batch_idx):
        x, y = batch
        y_hat = self(x)
        loss = F.cross_entropy(y_hat, y)
        return loss

    def training_step_end(self, training_step_outputs):
        return training_step_outputs

    def training_epoch_end(self, outputs) -> None:
        torch.stack([x["loss"] for x in outputs]).mean()

    def configure_optimizers(self):
        optimizer = torch.optim.SGD(self.parameters(), lr=0.01)
        lr_scheduler = torch.optim.lr_scheduler.StepLR(optimizer, step_size=1)
        return [optimizer], [lr_scheduler]

def test_x(tmpdir):
    # init model
    model = BoringModel()

    # Initialize a trainer
    trainer = pl.Trainer(
        max_epochs=1,
        progress_bar_refresh_rate=20,
        gpus=2,
        accelerator='ddp'
    )

    dm = mnist_datamodule(tmpdir, 16, 1)

    # Train the model ⚡
    trainer.fit(model=model, datamodule=dm)

if __name__ == '__main__':
    test_x(tmpdir)

Expected behavior
Clearly the model is very small and should not lead to an OOM. I'm getting similar errors outside of training contexts using a PTL model and calling .cuda().
Environment
* CUDA:
	- GPU:
		- GeForce RTX 2080 Ti
		- GeForce RTX 2080 Ti
	- available:         True
	- version:           10.2
* Packages:
	- numpy:             1.21.1
	- pyTorch_debug:     False
	- pyTorch_version:   1.9.0
	- pytorch-lightning: 1.4.1
	- tqdm:              4.62.0
* System:
	- OS:                Linux
	- architecture:
		- 64bit
		- ELF
	- processor:         x86_64
	- python:            3.8.0
	- version:           #1 SMP Tue Feb 18 16:39:12 EST 2020

Hey @import-antigravity,
I confirm it works fine for me. You might want to sync with your cluster management team and investigate with them.
(.venv) thomas@hyperplane1:~/pytorch-lightning$ python test.py
GPU available: True, used: True
GPU available: True, used: True
TPU available: False, using: 0 TPU cores
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
IPU available: False, using: 0 IPUs
Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz
Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz to data/MNIST/raw/train-images-idx3-ubyte.gz
9913344it [00:00, 36966131.28it/s]
Extracting data/MNIST/raw/train-images-idx3-ubyte.gz to data/MNIST/raw

Downloading http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz
Downloading http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz to data/MNIST/raw/train-labels-idx1-ubyte.gz
29696it [00:00, 54248280.31it/s]
Extracting data/MNIST/raw/train-labels-idx1-ubyte.gz to data/MNIST/raw

Downloading http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz
Downloading http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz to data/MNIST/raw/t10k-images-idx3-ubyte.gz
1649664it [00:00, 29075168.56it/s]
Extracting data/MNIST/raw/t10k-images-idx3-ubyte.gz to data/MNIST/raw

Downloading http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz
Downloading http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz to data/MNIST/raw/t10k-labels-idx1-ubyte.gz
5120it [00:00, 22676701.67it/s]
Extracting data/MNIST/raw/t10k-labels-idx1-ubyte.gz to data/MNIST/raw

/home/thomas/pytorch-lightning/.venv/lib/python3.8/site-packages/torchvision/datasets/mnist.py:498: UserWarning: The given NumPy array is not writeable, and PyTorch does not support non-writeable tensors. This means you can write to the underlying (supposedly non-writeable) NumPy array using the tensor. You may want to copy the array to protect its data or make it writeable before converting it to a tensor. This type of warning will be suppressed for the rest of this program. (Triggered internally at  /pytorch/torch/csrc/utils/tensor_numpy.cpp:180.)
  return torch.from_numpy(parsed.astype(m[2], copy=False)).view(*s)
/home/thomas/pytorch-lightning/pytorch_lightning/trainer/configuration_validator.py:120: UserWarning: you passed in a val_dataloader but have no validation_step. Skipping val loop
  rank_zero_warn(f"you passed in a {loader_name} but have no {step_name}. Skipping {stage} loop")
/home/thomas/pytorch-lightning/pytorch_lightning/core/datamodule.py:212: LightningDeprecationWarning: DataModule property `has_prepared_data` was deprecated in v1.4 and will be removed in v1.6.
  rank_zero_deprecation(
initializing ddp: GLOBAL_RANK: 0, MEMBER: 1/2
initializing ddp: GLOBAL_RANK: 0, MEMBER: 1/2
/home/thomas/pytorch-lightning/.venv/lib/python3.8/site-packages/torchvision/datasets/mnist.py:498: UserWarning: The given NumPy array is not writeable, and PyTorch does not support non-writeable tensors. This means you can write to the underlying (supposedly non-writeable) NumPy array using the tensor. You may want to copy the array to protect its data or make it writeable before converting it to a tensor. This type of warning will be suppressed for the rest of this program. (Triggered internally at  /pytorch/torch/csrc/utils/tensor_numpy.cpp:180.)
  return torch.from_numpy(parsed.astype(m[2], copy=False)).view(*s)
initializing ddp: GLOBAL_RANK: 1, MEMBER: 2/2
initializing ddp: GLOBAL_RANK: 1, MEMBER: 2/2
----------------------------------------------------------------------------------------------------
distributed_backend=nccl
All DDP processes registered. Starting ddp with 2 processes
----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------
distributed_backend=nccl
All DDP processes registered. Starting ddp with 2 processes
----------------------------------------------------------------------------------------------------

LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0,1,2,3,4,5,6,7]
LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0,1,2,3,4,5,6,7]
LOCAL_RANK: 1 - CUDA_VISIBLE_DEVICES: [0,1,2,3,4,5,6,7]
LOCAL_RANK: 1 - CUDA_VISIBLE_DEVICES: [0,1,2,3,4,5,6,7]

  | Name | Type   | Params
--------------------------------
0 | fc1  | Linear | 25.1 K
1 | fc2  | Linear | 330
--------------------------------
25.4 K    Trainable params
0         Non-trainable params
25.4 K    Total params
0.102     Total estimated model params size (MB)

  | Name | Type   | Params
--------------------------------
0 | fc1  | Linear | 25.1 K
1 | fc2  | Linear | 330
--------------------------------
25.4 K    Trainable params
0         Non-trainable params
25.4 K    Total params
0.102     Total estimated model params size (MB)
/home/thomas/pytorch-lightning/pytorch_lightning/core/hooks.py:694: LightningDeprecationWarning: Method `on_train_dataloader` in DataHooks is deprecated and will be removed in v1.7.0. Please use `train_dataloader()` directly.
  rank_zero_deprecation(
/home/thomas/pytorch-lightning/pytorch_lightning/trainer/data_loading.py:111: UserWarning: The dataloader, train_dataloader, does not have many workers which may be a bottleneck. Consider increasing the value of the `num_workers` argument` (try 255 which is the number of cpus on this machine) in the `DataLoader` init to improve performance.
  rank_zero_warn(
Epoch 0:   0%|                                                                                | 0/1875 [00:00<00:00, 4382.76it/s]/home/thomas/pytorch-lightning/.venv/lib/python3.8/site-packages/torch/nn/functional.py:1805: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
  warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
test.py:42: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.
  x = F.softmax(self.fc2(x))
[W reducer.cpp:1158] Warning: find_unused_parameters=True was specified in DDP constructor, but did not find any unused parameters in the forward pass. This flag results in an extra traversal of the autograd graph every iteration,  which can adversely affect performance. If your model indeed never has any unused parameters in the forward pass, consider turning this flag off. Note that this warning may be a false positive if your model has flow control causing later iterations to have unused parameters. (function operator())
/home/thomas/pytorch-lightning/.venv/lib/python3.8/site-packages/torch/nn/functional.py:1805: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
  warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
/home/thomas/pytorch-lightning/test.py:42: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.
  x = F.softmax(self.fc2(x))
[W reducer.cpp:1158] Warning: find_unused_parameters=True was specified in DDP constructor, but did not find any unused parameters in the forward pass. This flag results in an extra traversal of the autograd graph every iteration,  which can adversely affect performance. If your model indeed never has any unused parameters in the forward pass, consider turning this flag off. Note that this warning may be a false positive if your model has flow control causing later iterations to have unused parameters. (function operator())
Epoch 0:  25%|██████████████████████████                                                                                | 460/1875 [00:08<00:27, 51.84it/s, loss=2.3, v_num=204]

I've been running some tests and it's likely a problem with a specific compute node. I'll leave the issue open until I hear back but it's likely not PTL.

It was a bad compute node! Sorry for the inconvenience! 😄

It was a bad compute node! Sorry for the inconvenience! 😄


Fix cloud flare link

Used to support distribution via cloud flare

Added PR here: https://github.com/cdnjs/cdnjs/pull/7709

Is there a way to now get the full library without installing it?
Thanks !

Fixed by https://github.com/cdnjs/cdnjs/pull/7709
You can download the latest from the cdn


Refactor Selected View API Endpoint for Workspace

As the ECMPS system, I need to be able to call a selected view from the list of Emissions module views and display, so that users are able to view only the data that need to see.
Given the Selected View API Endpoint is created
When a view is selected from the list of emissions view in the API
Then the data from that view will be returned

[x] Refactor API so it is using the query builder and accepts year and quarter together as the reporting period

[x] This work is specifically for workspace view with url emissions-mgmt/workspace/emissions/views/{viewCode}

[x] Verify quarter and range validation is still working

[x] Add formatting validation for year and quarter YYYY Q1| YYYY Q2| YYYY Q3| YYYY Q4

[x] Add Validation Error Message "reportingPeriod must be specified in this format YYYY Q1"

Sample parameters:
viewCode - dailycal
monitorPlanId - GO619-E38--25E39413591C41A0B396309D03A7A207
unitIds - 1
reporting quarter - 2021 Q1


不能启动shadowsocks-libev使用这个插件

want start by systemctl
use:
setcap cap_net_bind_service+ep /usr/bin/v2ray-plugin
setcap cap_net_bind_service+ep /usr/bin/ss-server
from other lssues, doesn't work
{
"server":"<IP_ADDRESS>",
"server_port":80,
"local_port":,
"password":"**",
"timeout":60,
"method":"chacha20-ietf-poly1305",
"mode": "tcp_and_udp",
"fast_open": true,
"no_delay": true,
"reuse_port": true,
"plugin":"/usr/bin/v2ray-plugin",
"plugin-opts":"server"
}
● shadowsocks-libev.service - Shadowsocks-libev Default Server Service
Loaded: loaded (/usr/lib/systemd/system/shadowsocks-libev.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2019-05-11 07:00:27 UTC; 16s ago
Docs: man:shadowsocks-libev(8)
Process: 3781 ExecStart=/usr/bin/ss-server -c $CONFFILE $DAEMON_ARGS (code=exited, status=255)
Main PID: 3781 (code=exited, status=255)
May 11 07:00:27 vultr.guest ss-server[3781]: 2019-05-11 07:00:27 INFO: udp server listening at <IP_ADDRESS>:80
May 11 07:00:27 vultr.guest ss-server[3781]: 2019-05-11 07:00:27 INFO: udp port reuse enabled
May 11 07:00:27 vultr.guest ss-server[3781]: 2019-05-11 07:00:27 INFO: running from root user
May 11 07:00:27 vultr.guest ss-server[3781]: 2019/05/11 07:00:27 V2Ray 4.16 (Po) Custom
May 11 07:00:27 vultr.guest ss-server[3781]: 2019/05/11 07:00:27 A unified platform for anti-censorship.
May 11 07:00:27 vultr.guest ss-server[3781]: 2019/05/11 07:00:27 failed to start server: v2ray.com/core/app/proxyman/inbound: failed to listen TCP on 33121 > v2ray.com/core/transport/internet: failed to listen on address:...ss already in use
May 11 07:00:27 vultr.guest ss-server[3781]: 2019-05-11 07:00:27 ERROR: plugin service exit unexpectedly
May 11 07:00:27 vultr.guest systemd[1]: shadowsocks-libev.service: main process exited, code=exited, status=255/n/a
May 11 07:00:27 vultr.guest systemd[1]: Unit shadowsocks-libev.service entered failed state.
May 11 07:00:27 vultr.guest systemd[1]: shadowsocks-libev.service failed.

plugin-opts => plugin_opts
Dash to underscore.

@liujunhui74 It doesn't work.when I write it to command line instead of in json it worked. Is this a bug?
like this:
 command: ["/usr/bin/ss-server", "-c", "/config/shadowsocks.json", "--plugin-opts", "server;tls;host=mydomain.me"]

@liujunhui74 It doesn't work.when I write it to command line instead of in json it worked. Is this a bug?
like this:
 command: ["/usr/bin/ss-server", "-c", "/config/shadowsocks.json", "--plugin-opts", "server;tls;host=mydomain.me"]

In json it is "plugin_opts":"server;host=example.com
In command line it is --plugin-opts="server;host=example.com
In your command line the arg --plugin=v2ray is missing
Either way you can cat /proc/<v2ray plugin pid>/environ to get the real opt values.

@liujunhui74 Hi, thank you for reply :). I use docker-compose to start the shadowsocks-libev server and mount the binary v2ray to /usr/local/bin/v2ray.Maybe you can do what I have done to reproduce the problem.
version: '3'
services:
  shadowsocks:
container_name: shadowsocks
    restart: always
    privileged: true
    image: shadowsocks/shadowsocks-libev
    ports:
      - 8443:8443
      - 8443:8443/udp
    volumes:
      - ${PWD}/config:/config
      - ${PWD}/config/v2ray-plugin:/usr/local/bin/v2ray-plugin
        command: ["/usr/bin/ss-server", "-c", "/config/shadowsocks.json", "--plugin", "v2ray-plugin", "--plugin-opts", "server;fast-open;path=/v2ray;host=mydomain.com;loglevel=none"]

if you put the last two options in shadowsock.json, it will not start correctly. so I put them out of json.
This is my probelm.
Thank you again :)

Maybe you should specify the full path to the plugin. Check your log for
clues.
Cola Chen<EMAIL_ADDRESS>于2019年6月5日周三 上午9:28写道：

@liujunhui74 https://github.com/liujunhui74 Hi, thank you for reply :).
I use docker-compose to start the shadowsocks-libev server and mount the
binary v2ray to /usr/local/bin/v2ray.Maybe you can do what I have done to
reproduce the problem.
version: '3'
services:
shadowsocks:
container_name: shadowsocks
restart: always
privileged: true
image: shadowsocks/shadowsocks-libev
ports:
- 8443:8443
- 8443:8443/udp
volumes:
- ${PWD}/config:/config
- ${PWD}/config/v2ray-plugin:/usr/local/bin/v2ray-plugin
command: ["/usr/bin/ss-server", "-c", "/config/shadowsocks.json", "--plugin", "v2ray-plugin", "--plugin-opts", "server;fast-open;path=/v2ray;host=mydomain.com;loglevel=none"]
if you put the last two options in shadowsock.json, it will not start
correctly. so I put them out of json.
This is my probelm.
Thank you again :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/shadowsocks/v2ray-plugin/issues/79?email_source=notifications&email_token=AC7AK66YTHSHUWTUW4KZ4HLPY4JCNA5CNFSM4HMHQO4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW6KROQ#issuecomment-498903226,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AC7AK67QF4GMSMRLQ5JCGZDPY4JCNANCNFSM4HMHQO4A
.


[FEATURE] Xiami music

Will you consider to support Xiami music platform? such like artist, playlist, albums, etc.

Description

+1


Can we add a getter to access current user data inside stacked_firebase_auth service?

I could not find any property or getter through which i can access current user data, can we implement one getter for stacked_firebase_auth service to get current user data.

Sure. We can add that in

How can I handle stacked_firebase_auth with JWT token when calling the firebase cloud functions?
Like checking the expired before it calls the RESTful APIs

Hello @amoslai5128 for now this is not merge into main stacked_firebase_auth service, but you can still
use by insert this in your ViewModel
User? get getUser => FirebaseAuth.instance.currentUser;
and you can
Get a [IdTokenResult] containing the users JSON Web Token (JWT) and
other metadata like  expirationTime, issuedAtTime along with signInProvider.
By using
var result = await model.getUser! .getIdTokenResult();
print(result.expirationTime);
print(result);

If [forceRefresh] is true, the token returned will be refreshed regardless
of token expiration.
var result = await model.getUser! .getIdTokenResult(true);

@abhay-osizone
FirebaseAuth.instance is exposed through firebaseAuth variable in FirebaseAuthenticationService.
For example you can access current user like this:
authService.firebaseAuth.currentUser;
@amoslai5128
I am not sure about cloud functions since I don't use them, but for regular REST API, you can send JWT token in http header.
You can get the token using:
FirebaseAuth.instance.currentUser.getIdToken()
or
authService.firebaseAuth.currentUser.getIdToken()
getIdToken handles token refreshes automatically, in the documentation it says:

Returns the current token if it has not expired. Otherwise, this will
refresh the token and return a new one.

@FilledStacks
If it is easier for users, Firebase Core and Auth can be exported for easier access and autocomplete without manual imports:
export 'package:firebase_core/firebase_core.dart';
export 'package:firebase_auth/firebase_auth.dart';
Idk what do you think about this?

@merfire thanks,  i didn't notice.

@merfire I think that's perfectly fine. I'm making releases for 2 packages now. I only have 20 minutes left of open source work but I can get someone to add that for us.

@amoslai5128
I am not sure about cloud functions since I don't use them, but for regular REST API, you can send JWT token in http header.
You can get the token using:
FirebaseAuth.instance.currentUser.getIdToken()
or
authService.firebaseAuth.currentUser.getIdToken()
getIdToken handles token refreshes automatically, in the documentation it says:

Returns the current token if it has not expired. Otherwise, this will
refresh the token and return a new one.

@FilledStacks
If it is easier for users, Firebase Core and Auth can be exported for easier access and autocomplete without manual imports:
export 'package:firebase_core/firebase_core.dart';
export 'package:firebase_auth/firebase_auth.dart';
Idk what do you think about this?

Thank you all for your quick and detailed response. I knew firebase auth has API for getting idToken, but what's the best practice for the following case?
Let's say I have multiple ViewModel that relies on a user token to fetch the APIs, it shall refresh per 55 mins and I want it works in the background rather than checking it every time before fetching API.
Should I make a centralized token state to expose the token and count it down to refresh?
Or should I just keep storing it into a local database?

@amoslai5128
If you are using Firebase Auth you don't really need to worry about storing and refreshing the token, because Firebase Auth does all that for you. For HTTP I like using Dio library with auth interceptor that adds JWT token to header for every request.
If the user is signed in, this:
await FirebaseAuth.instance.currentUser?.getIdToken()
will always return a valid token, because even if the token expires this function will check for that and return a new valid token automaticly.
I suggest to just call this function and get JWT token before every HTTP request where token is needed.
Like I said I haven't used cloud functions so you need to check how cloud functions work with firebase auth, specifically how to send JWT token to your cloud functions, here is a hint that might help you.
Note: @abhay-osizone mentioned getIdToken(true) which will force refresh the JWT token every time you call this function. I would suggest not to use this if you don't know what it is used for and to just use regular getIdToken() that will refresh the token only if it is expired.


Update Permission Allow Once, While Using the Apps, and Deny

Bug Report
Currently, location permissions have three different options than before.
The Past: Allow, Deny, and Deny Forever
Now: Allow Once (Ask Next Time Or When I Share / Only This Time), While Using The App, and Deny
If the user selects "Allow Once", the checkPermission() function will return permission == LocationPermission.denied
and can be handled with requestPermission() . function
And if user select "Deny", function checkPermission() will also returnpermission == LocationPermission.denied but requestPermission() does not work and does not display permission dialog
So since checkPermission is only 'denied' not 'deniedForever'. I can't handle it by using openAppSetings() or openLocationSetting() options.
So I think "Deny" for now (this time) means "Deny Forever"
Expected behavior
Able to call requestPermission(), openAppSetings() or openLocationSetting() if user choose Deny.
Reproduction steps

Select Deny when the app asks for permission
requestPermission() will not run / or no permission dialog appears

Version: when:
iOS 15.4
Android 11
Platforms:
both iPhone and Android

Hi @sed1ka,
When you deny permissions on iOS they immediately result in the PermissionStatus.deniedForever status, the checkPermission() method will also return this value in subsequent checks.
However Android unfortunately doesn't support this. The native Android API only returns a DENIED or GRANTED status when checking permissions and doesn't allow us to make a distinction between "denied but you can try again" and "denied and don't ask again". Using a workaround it is possible to return this state directly after requesting permissions and therefore we recommend to handle permissions in the following manor:
bool serviceEnabled;
LocationPermission permission;

// Test if location services are enabled.
serviceEnabled = await Geolocator.isLocationServiceEnabled();
if (!serviceEnabled) {
  // Location services are not enabled don't continue
  // accessing the position and request users of the
  // App to enable the location services.
  return;
}

permission = await Geolocator.checkPermission();
if (permission == LocationPermission.denied) {
  permission = await Geolocator.requestPermission();
  if (permission == LocationPermission.deniedForever) {
    // Permissions are denied forever, handle appropriately.
    return;
  }

  if (permission == LocationPermission.denied) {
    // Permissions are denied, next time you could try
    // requesting permissions again (this is also where
    // Android's shouldShowRequestPermissionRationale
    // returned true. According to Android guidelines
    // your App should show an explanatory UI now.
    return;
  }
} else if (permission == LocationPermission.deniedForever) {
  // Permissions are denied forever, handle appropriately.
  return;
}

// When we reach here, permissions are granted and we can
// continue accessing the position of the device.
_position = await Geolocator.getCurrentPosition();

More background information can be found in the Breaking changes in 7.0.0 article on our Wiki page.
I will go ahead and close this issue as the permissions are working as intended. If you have further questions however don't hesitate to leave a comment.


Support frameworks and manifests in ContentLoader

As we move to handling multiple frameworks the ContentLoader needs to be able to support this. This commit changes the ContentLoader's role so that it is responsible for managing multiple manifests across multiple frameworks. Rather than creating multiple ContentLoader instances we create one, pointing it at the root content directory (digitalmarketplace-frameworks). On application startup we load the manifests we need and then get builders by framework slug and manifest name. If a manifest is not found either when loading or when getting a buidler we error with a ContentNotFound error and should fail fast.
Note that this changes read_yaml so that it raises an error if the file is not found. read_yaml only seems to be used by the content loader so this should not cause errors.
Example app change
At application startup
Old
existing_service_content = ContentLoader(
    'app/content/frameworks/g-cloud-6/manifests/edit_service.yml',
    'app/content/frameworks/g-cloud-6/questions/services/'
)
new_service_content = ContentLoader(
    'app/content/frameworks/g-cloud-7/manifests/edit_submission.yml',
    'app/content/frameworks/g-cloud-7/questions/services/'
)
declaration_content = ContentLoader(
    'app/content/frameworks/g-cloud-7/manifests/declaration.yml',
    'app/content/frameworks/g-cloud-7/questions/declaration/'
)

New
content_loader = ContentLoader('app/content')
content_loader.load_manifest('g-cloud-6', 'edit_service', 'services')
content_loader.load_manifest('g-cloud-7', 'edit_submission', 'services')
content_loader.load_manifest('g-cloud-7', 'declaration', 'declaration')

In the views
Old
content = declaration_content.get_builder()

New
content = content_loader.get_builder(framework_slug, 'declaration')

NOT READY: I still need to update the CHANGELOG but needed a PR link

Got this working locally in the supplier app. Didn't encounter any problems. I think the level of sophistication is about right when we're still dealing with a low number of frameworks.

:+1:


Version 3.4 Triggers Windows Defender

As said in the title, version 3.4 triggered three separate virus warnings in Windows Defender. Trojan:Script/Phonzy.B!ml in Winpilot.zip->app/backend.js, Trojan:Win32/Wacatac.B!ml in Winpilot.zip->Winpilot.exe, and Trojan:Script/Wacatac.H!ml in Winpilot.zip->app/frontend.html.  While I doubt that there's actually a trojan in these files, is there a way for you to submit to Microsoft so that your program doesn't get detected as a virus in the future?

Were already reported! What protection definition do you have?

Definitions updated.


WALLET.md minor formatting and grammar tweaks

Description
Added a link to jenv and made some of the troubleshooting steps a bit easier to read.
Test plan
N/A minor document change.
Related issues
N/A
Backwards compatibility
Doc only, N/A

I'm marking this PR as spam/invalid. It seems not relevant or superflouous. Please review Hactoberfest's quality standard before making additional PRs:

Hacktoberfest is about contributing meaningfully to open-source projects. Here are some examples of low-quality pull/merge requests that won’t count towards Hacktoberfest.

Automated pull/merge requests: scripted opening pull requests to remove whitespace, fix typos or optimize images.
Disruptive pull/merge requests: taking someone else’s branch/commits and making a pull request.
Anything that a project maintainer flags as spam.
Anything that looks like an attempt to duplicate your pull request count for October.
Multiple pull/merge requests for the same issue that are unnecessary, for example five PR/MRs to remove a stray whitespace.


HIVE-28526 may produce null pointer when struct type value is null

What changes were proposed in this pull request?
null pointer check
Why are the changes needed?
it is a bug.
Does this PR introduce any user-facing change?
No
Is the change a dependency upgrade?
No
How was this patch tested?
sql test, add ql/src/test/queries/clientpositive/struct_null_select.q
create table test_struct
(
f1 string,
demo_struct struct<f1:string,f2:string,f3:string>,
datestr string
);
insert into test_struct(f1, datestr) select 'test_f1','datestr_1';

I failed reproduce the problem with your test on TestMiniLlapLocalCliDriver, and it seems that this issue is fixed by HIVE-27690. Could you check and share your test environment?


fixing Exclude + Prevent Applying Multiple times + Switch Dark/Light

now these three features should work without interfering
-Exclude Controls from processing
-Prevent Applying Multiple times if not necessary
-Switch Dark/Light
also improved the clarity and extensibility of corresponding code
tested in the Demo and in my own app

Thank you!


Buttons aren't working 😕

These buttons are not working.

this demo only works on Android 13 API 33

Fixed 😍

My android version is 12
On Wed, 24 Aug 2022, 11:40 am FolderV, @.***> wrote:

this demo only works on Android 13 API 33
—
Reply to this email directly, view it on GitHub
https://github.com/folderv/androidDataWithoutRootAPI33/issues/3#issuecomment-1225242266,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AYQTTHZ3NGQMJAQO7KXGXO3V2W4D3ANCNFSM57N5DXAA
.
You are receiving this because you authored the thread.Message ID:
@.***>


only set URL_LAUNCHER_URL once

I noticed in #34 I set this twice when it could just be set once.

@stefan-mihaila @craig-mulligan let's merge?


ruff: 0.4.1 -> 0.4.2

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/astral-sh/ruff/releases.
meta.description for ruff is: An extremely fast Python linter
meta.homepage for ruff is: https://github.com/astral-sh/ruff
meta.changelog for ruff is: https://github.com/astral-sh/ruff/releases/tag/v0.4.2
Updates performed

Rust version update

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 0.4.2 with grep in /nix/store/hby03blfglcw8mjw4140n2ddq3q3j0hx-ruff-0.4.2
found 0.4.2 in filename of file in /nix/store/hby03blfglcw8mjw4140n2ddq3q3j0hx-ruff-0.4.2

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

21 total rebuild path(s)

21 package rebuild(s)

First fifty rebuilds by attrpath

dmarc-metrics-exporter
emacsPackages.lsp-bridge
maigret
nbqa
python311Packages.pyhanko
python311Packages.pytest-examples
python311Packages.python-lsp-ruff
python311Packages.xhtml2pdf
python311Packages.xsdata
python312Packages.pyhanko
python312Packages.pytest-examples
python312Packages.xhtml2pdf
python312Packages.xsdata
ruff
ruff-lsp
sasview
tests.testers.nixosTest-example
tests.testers.runNixOSTest-example
tests.trivial-builders.references
vunnel

Instructions to test this update (click to expand)

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

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

Or:
nix build github:r-ryantm/nixpkgs/8f21c3b46ef377e003a33b7c50314e67c901ca0f#ruff

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/hby03blfglcw8mjw4140n2ddq3q3j0hx-ruff-0.4.2
ls -la /nix/store/hby03blfglcw8mjw4140n2ddq3q3j0hx-ruff-0.4.2/bin

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

6 packages failed to build:

python312Packages.pyhanko
python312Packages.pyhanko.dist
python312Packages.xhtml2pdf
python312Packages.xhtml2pdf.dist
python312Packages.xsdata
python312Packages.xsdata.dist

26 packages built:

dmarc-metrics-exporter
dmarc-metrics-exporter.dist
emacsPackages.lsp-bridge
maigret
maigret.dist
nbqa
nbqa.dist
python311Packages.pyhanko
python311Packages.pyhanko.dist
python311Packages.pytest-examples
python311Packages.pytest-examples.dist
python311Packages.python-lsp-ruff
python311Packages.python-lsp-ruff.dist
python311Packages.xhtml2pdf
python311Packages.xhtml2pdf.dist
python311Packages.xsdata
python311Packages.xsdata.dist
python312Packages.pytest-examples
python312Packages.pytest-examples.dist
ruff
ruff-lsp
ruff-lsp.dist
sasview
sasview.dist
vunnel
vunnel.dist

Maintainer pings
cc @figsoda for testing.

Result of nixpkgs-review pr 306898 run on x86_64-linux 1

6 packages failed to build:

python312Packages.pyhanko
python312Packages.pyhanko.dist
python312Packages.xhtml2pdf
python312Packages.xhtml2pdf.dist
python312Packages.xsdata
python312Packages.xsdata.dist

29 packages built:

dmarc-metrics-exporter
dmarc-metrics-exporter.dist
emacsPackages.lsp-bridge
maigret
maigret.dist
nbqa
nbqa.dist
python311Packages.pyhanko
python311Packages.pyhanko.dist
python311Packages.pytest-examples
python311Packages.pytest-examples.dist
python311Packages.python-lsp-ruff
python311Packages.python-lsp-ruff.dist
python311Packages.xhtml2pdf
python311Packages.xhtml2pdf.dist
python311Packages.xsdata
python311Packages.xsdata.dist
python312Packages.pytest-examples
python312Packages.pytest-examples.dist
ruff
ruff-lsp
ruff-lsp.dist
sasview
sasview.dist
tests.testers.nixosTest-example
tests.testers.runNixOSTest-example
tests.trivial-builders.references
vunnel
vunnel.dist

Result of nixpkgs-review pr 306898 run on aarch64-linux 1

6 packages failed to build:

python312Packages.pyhanko
python312Packages.pyhanko.dist
python312Packages.xhtml2pdf
python312Packages.xhtml2pdf.dist
python312Packages.xsdata
python312Packages.xsdata.dist

29 packages built:

dmarc-metrics-exporter
dmarc-metrics-exporter.dist
emacsPackages.lsp-bridge
maigret
maigret.dist
nbqa
nbqa.dist
python311Packages.pyhanko
python311Packages.pyhanko.dist
python311Packages.pytest-examples
python311Packages.pytest-examples.dist
python311Packages.python-lsp-ruff
python311Packages.python-lsp-ruff.dist
python311Packages.xhtml2pdf
python311Packages.xhtml2pdf.dist
python311Packages.xsdata
python311Packages.xsdata.dist
python312Packages.pytest-examples
python312Packages.pytest-examples.dist
ruff
ruff-lsp
ruff-lsp.dist
sasview
sasview.dist
tests.testers.nixosTest-example
tests.testers.runNixOSTest-example
tests.trivial-builders.references
vunnel
vunnel.dist

Result of nixpkgs-review pr 306898 run on aarch64-darwin 1

24 packages failed to build:

dmarc-metrics-exporter
dmarc-metrics-exporter.dist
emacsPackages.lsp-bridge
maigret
maigret.dist
nbqa
nbqa.dist
python311Packages.pyhanko
python311Packages.pyhanko.dist
python311Packages.xhtml2pdf
python311Packages.xhtml2pdf.dist
python312Packages.pyhanko
python312Packages.pyhanko.dist
python312Packages.xhtml2pdf
python312Packages.xhtml2pdf.dist
python312Packages.xsdata
python312Packages.xsdata.dist
sasview
sasview.dist
tests.testers.nixosTest-example
tests.testers.runNixOSTest-example
tests.trivial-builders.references
vunnel
vunnel.dist

13 packages built:

python311Packages.pytest-examples
python311Packages.pytest-examples.dist
python311Packages.python-lsp-ruff
python311Packages.python-lsp-ruff.dist
python311Packages.xsdata
python311Packages.xsdata.dist
python312Packages.pytest-examples
python312Packages.pytest-examples.dist
python312Packages.python-lsp-ruff
python312Packages.python-lsp-ruff.dist
ruff
ruff-lsp
ruff-lsp.dist

Result of nixpkgs-review pr 306898 run on x86_64-darwin 1

28 packages failed to build:

dmarc-metrics-exporter
dmarc-metrics-exporter.dist
emacsPackages.lsp-bridge
maigret
maigret.dist
nbqa
nbqa.dist
python311Packages.pyhanko
python311Packages.pyhanko.dist
python311Packages.pytest-examples
python311Packages.pytest-examples.dist
python311Packages.xhtml2pdf
python311Packages.xhtml2pdf.dist
python312Packages.pyhanko
python312Packages.pyhanko.dist
python312Packages.pytest-examples
python312Packages.pytest-examples.dist
python312Packages.xhtml2pdf
python312Packages.xhtml2pdf.dist
python312Packages.xsdata
python312Packages.xsdata.dist
sasview
sasview.dist
tests.testers.nixosTest-example
tests.testers.runNixOSTest-example
tests.trivial-builders.references
vunnel
vunnel.dist

7 packages built:

python311Packages.python-lsp-ruff
python311Packages.python-lsp-ruff.dist
python311Packages.xsdata
python311Packages.xsdata.dist
ruff
ruff-lsp
ruff-lsp.dist

Obsoleted by #307279


[Question] Joining on multiple predicates

Domain model
public class Profile
{
    public int Id { get; set; }

    public bool IsLocked { get; set; }
}

public class YoutubeChannel
{
    public int Id { get; set; }

    public YoutubeAgeStatistics Age { get; set; }

   public YoutubeGenderStatistics Gender { get; set; }

   public YoutubeCityStatistics City { get; set; }

  // A couple more
}

public abstract class AgeStatistics
{
   // Two first constitutes the PrimaryKey
    public int PlatformType { get; set; }
    public int PlatformId { get; set; }
    public decimal Value { get; set; }
    public AgeRange Range { get; set; } // Another class with Id/Value [{0,18-},{1,19-24}, ...]
}

public class YoutubeAgeStatistics : AgeStatistics { }
public class InstagramAgeStatistics : AgeStatistics { }

Query
var query = _context.Profiles.Include(p => p.Categories).ThenInclude(c => c.Category);
....
// Filtering if YouTube platform is selected
if(search.FilterYoutube)
{
var iq = (from p in query
join y in _context.YoutubeChannels on
new
{
   ProfileId = p.Id,
   IsLocked = search.HideLockedPlatforms
} equals new
{
   y.ProfileId,
   y.IsLocked
} into y1
from y2in y1.DefaultIfEmpty()
where y2 != null
select p);
// Translate to `... left join YoutubeChannels y on y.ProfileId = p.Id and y.IsLocked = {0,1} ...`
// Including above on iq.Include() just creates one left join according to above
query = query
                            .Include(p => p.Youtube)
                            .ThenInclude(b => b.Network)
                        .Include(p => p.Youtube)
                            .ThenInclude(p => p.AgeDistributions)
                                .ThenInclude(p => p.AgeRange)
                        .Include(p => p.Youtube)
                            .ThenInclude(p => p.GenderDistributions)
                        .Include(p => p.Youtube)
                            .ThenInclude(p => p.CityDistributions)
                        .Include(p => p.Youtube)
                            .ThenInclude(p => p.CountryDistributions)

Problem is that when the query is translated to SQL I end up with below
Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilderFactory:Information: Executed DbCommand (98ms) [Parameters=[@__ps_0='?', @__p_1='?', @__p_2='?'], CommandType='Text', CommandTimeout='30']
SELECT * -- Every single column of [y], [y1], ... [y_n]
FROM [Profiles] AS [p]
LEFT JOIN [YoutubeChannels] AS [p.Youtube] ON [p].[Id] = [p.Youtube].[ProfileId]
LEFT JOIN [YoutubeChannels] AS [y] ON [y].[ProfileId] = [p].[Id]
LEFT JOIN [YoutubeChannels] AS [y2] ON [y2].[ProfileId] = [p].[Id]
LEFT JOIN [YoutubeChannels] AS [y4] ON [y4].[ProfileId] = [p].[Id]
LEFT JOIN [YoutubeChannels] AS [y6] ON [y6].[ProfileId] = [p].[Id]
LEFT JOIN [YoutubeChannels] AS [y8] ON [y8].[ProfileId] = [p].[Id]
LEFT JOIN [Networks] AS [n] ON [y8].[NetworkId] = [n].[Id]
WHERE (([p].[Deleted] = 0) AND ([p].[PriceSegment] = @__ps_0)) AND [p.Youtube].[Id] IS NOT NULL
ORDER BY [p].[FullName], [p].[Id], [y].[Id], [y2].[Id], [y4].[Id], [y6].[Id]
OFFSET @__p_1 ROWS FETCH NEXT @__p_2 ROWS ONLY

SELECT [y7].[CountryCode], [y7].[ChannelId], [y7].[Channel], [y7].[Distribution]
FROM [YoutubeCountryDistribution] AS [y7]
INNER JOIN (
    SELECT DISTINCT [t3].*

    FROM (
        SELECT [p].[FullName], [p].[Id]
        FROM [Profiles] AS [p]
        LEFT JOIN [YoutubeChannels] AS [p.Youtube] ON [p].[Id] = [p.Youtube].[ProfileId]
        WHERE (([p].[Deleted] = 0) AND ([p].[PriceSegment] = @__ps_0)) AND [p.Youtube].[Id] IS NOT NULL
        ORDER BY [p].[FullName], [p].[Id]
        OFFSET @__p_1 ROWS FETCH NEXT @__p_2 ROWS ONLY
    ) AS [t]
) AS [p1] ON [p0].[ProfileId] = [p1].[Id]
INNER JOIN [Categories] AS [c] ON [p0].[CategoryId] = [c].[Id]
ORDER BY [p1].[FullName], [p1].[Id]

What I would like to do sematically and syntax wise is query.IncludeIf(p => p.YouTube, p => p.IsLocked == showLocked) that translate to left join youtube y on y.ProfileId = p.Id and y.IsLocked = __p1
Just by executing the LINQ query generates excessive joins
SELECT *
FROM [Profiles] AS [p]
LEFT JOIN [YoutubeChannels] AS [p.Youtube] ON [p].[Id] = [p.Youtube].[ProfileId]
LEFT JOIN [YoutubeChannels] AS [y] ON ([p].[Id] = [y].[ProfileId]) AND (@__search_HideLockedPlatforms_1 = [y].[Locked])
WHERE (([p].[Deleted] = 0) AND ([p].[PriceSegment] = @__ps_0)) AND [y].[Id] IS NOT NULL
ORDER BY [p].[Id], (SELECT 1)

Update: Executing the query as whole with the correct left join and all statistics produce
Microsoft.AspNetCore.Authorization.DefaultAuthorizationService:Information: Authorization failed for user: (null).

Will try to extract the vital parts so that I can create a reproducible project
Further technical details
EF Core version: 1.0.0 and 1.1.0
Database Server: SQL Server Express (13.0.1601)
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system: Windows 10
IDE: Visual Studio 2017 Community

We believe this is resolved by #7974


Add support for flexible Python3 versions

The installation process seems to currently depend on python3.8 being installed on the user's system. I'd propose one of two alternatives:

Relax this dependency to just a generic Python3 dependency. This could be accomplished by changing the Python version specified in publish-prebuild.yml to just 3.x
Use a build matrix and build for multiple Python versions (3.5, 3.6, 3.7, 3.8, 3.9)

@arition What do you think?

For the first solution, I don't think it will solve the problem since the compiler will still try to link the binary to a specific python version that exists in the building environments.
For the second solution, for now I think the prebuild package has no ability to detect the Python version on target system, so it is not helpful to build the binary for multiple python versions.

Since the linking to python is completely useless in this project, I would like to create a patch for torchvision that disable ununsed python related code on compiling. With the upcoming Torchvision 0.8.x, we also need to do similar things to disable useless libjpeg / libpng linking.

Since the linking to python is completely useless in this project, I would like to create a patch for torchvision that disable ununsed python related code on compiling. With the upcoming Torchvision 0.8.x, we also need to do similar things to disable useless libjpeg / libpng linking.

Also, is the static dependency on Python 3.8 a new introduction? I didn't see it earlier

Also, is the static dependency on Python 3.8 a new introduction? I didn't see it earlier

I think cmake will automatically find and link a python version installed on your system, so you may not noticed before.

Just make some small experiments. Seems that not only Torchvision, PyTorch itself also has a reference on Python. Again, I do not have a Mac, so I cannot do further experiments. If you have time, can you use otool to check if pytorch's dylib has a reference/link to python library?

Just make some small experiments. Seems that not only Torchvision, PyTorch itself also has a reference on Python. Again, I do not have a Mac, so I cannot do further experiments. If you have time, can you use otool to check if pytorch's dylib has a reference/link to python library?

Sorry for the delayed response on this, but it doesn't. Only libtorchvision.dylib does


Can't print PDF google drive

Can't get pdf to correctly print when printing to google drive. pdf shows up fine on local but comes across blank in google drive.
File.open(Rails.root.join('public', "#{invoice_number}.pdf"), 'wb') do |file|
file.write(decoded_invoice_pdf)
end
printer.print(title: "#{invoice_number}_1.pdf", content: decoded_invoice_pdf, content_type: "application/pdf")
printer.print(title: "#{invoice_number}_2.pdf", content: File.read(Rails.root.join('public', "#{invoice_number}.pdf")), content_type: "application/pdf")

Hi. Unfortunately, I won't be able to get to this until the middle of next week. In the meantime, if you could share a version of the PDF with all the sensitive info removed, either here or via email, that could be very useful.

Hi again, @tmedford. I need to see what it is you're trying to print if I'm to do anything about this ticket.

I have the same issue. I've tried to send a bunch of different pdfs. They all end up blank. Curiously, they have the right number of pages. I tried downloading the resulting file and it resembles in size but is clearly different. I think Google Drive is being clever and tries to convert the document TO pdf, even though it is already on this form.

After some digging around, I managed to figure out the problem. If you just pass a pdf as a string, a request using application/x-www-form-urlencoded will be constructed. Apparently something on the server side chokes on that somehow (Even though I can't find any mention of that in Google's documentation). If, instead, the contents are written to a file or wrapped in a StringIO, the request is built with multipart/form-data and it works.
I think we should either always use multipart in CloudPrint::Printer#print or it should be clearly documented in the read-me. Any thoughts on this @thegengen ?


 I've followed the instructions on this page to enable rights for Project Collection Build Service and I also made sure that persistCredentials is set to true. When I do git config --list in the PowerShell script I can see the line with http.https:(someurl)=AUTHORIZATION: bearer ***, which was set as the last step in checkout. However, I'm getting the error below. Do I need to setup the user email (what would that be with respect to the Azure DevOps project?) and the password as the access token or is there something else that I'm missing? Thank you!

pool:
  vmImage: 'VS2017-Win2016'

variables:
  solution: '**/*.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'

steps:
- checkout: self
  persistCredentials: true
  clean: true

- powershell: |
   git --version
   New-Item -Path "$(System.DefaultWorkingDirectory)" -Name "testfile1.txt" -ItemType "file" -Value "This is a text string."
   Write-Host "new file created, now adding file to git"
   git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" add -A
   Write-Host "git commit with message"
   git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" commit -a -m "Test Commit from Azure DevOps"
   Write-Host "git push"
   git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push

@cykreng
I think the following should work.
pool:
  vmImage: 'VS2017-Win2016'

variables:
  solution: '**/*.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'

steps:
- checkout: self
  persistCredentials: true
  clean: true

- powershell: |
   git --version
   New-Item -Path "$(System.DefaultWorkingDirectory)" -Name "testfile1.txt" -ItemType "file" -Value "This is a text string."
   Write-Host "new file created, now adding file to git"
   git add -A
   Write-Host "setup author info"
   git config user.email<EMAIL_ADDRESS>   git config user.name "your name"
   Write-Host "git commit with message"
   git commit -a -m "Test Commit from Azure DevOps"
   Write-Host "git push"
   git push

Hi @TingluoHuang, that worked, thank you so much! To confirm, the user.email and the user.names can be any value or do they have to be anything specific with respect to the project (ie. the project collection build service)? I've tried different accounts and they all seem to be letting me through. Thanks again!

@cykreng you might want to talk with your project admin for that, but from my experience, i would recommend give it a special user.name/email to help you identify the git commit is pushed by your pipeline process, like (user.name = 'Pipeline Git Push')

@TingluoHuang, understood. So the name and the email aren't really for authentication purposes but more for documentation as part of the git history?

@cykreng Yes.

Thank you!


implements seq model for discretised encoding

Fixes # .
Checklist
Any checks which are not relevant to the PR can be pre-checked by the PR creator.
All others should be checked by the reviewer(s).
You can add extra checklist items here if required by the PR.

[ ] CHANGELOG updated
[ ] Tests added to cover contribution
[ ] Documentation updated

Codecov Report
Attention: 80 lines in your changes are missing coverage. Please review.

Comparison is base (63b9219) 57.67% compared to head (bdec77d) 56.08%.

Files
Patch %
Lines

caveat/models/seq/lstm_discrete.py
18.36%
80 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #17      +/-   ##
==========================================
- Coverage   57.67%   56.08%   -1.59%
==========================================
  Files          42       43       +1
  Lines        2301     2400      +99
  Branches      227      231       +4
==========================================
+ Hits         1327     1346      +19
- Misses        941     1021      +80
  Partials       33       33

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


Add Auth middleware

Need to create mockup for auth middleware.
This middleware need to be added to endpoints for updating user data

No need to create auth middleware cause we don't have full login system


real-time SLAM processing

Hello all,
I am trying to feed live data from my Ouster Lidar to LeGO LOAM, instead of post-processing playing rosbag, but I haven't found the right way yet.
Has anyone made it ? Do you know if it's even possible ?
Thanks.

Did you find a way?


Symk build error

Errors are thrown during symk build. The operating system had cmake autoconf automake g++ libtool make.
#4 32.73 [  8%] Performing build step for 'libcudd'
#4 32.74 make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
#4 32.82 make[4]: *** No rule to make target '/Users/jungkookang/Documents/projects/lemming/server/third_party/symk/src/search/ext/cudd-3.0.0/cudd/cuddAddAbs.c', needed by 'cudd/libcudd_la-cuddAddAbs.lo'.  Stop.
#4 32.82 make[3]: *** [Makefile:1044: all] Error 2
#4 32.82 make[2]: *** [search/CMakeFiles/libcudd.dir/build.make:86: search/libcudd-prefix/src/libcudd-stamp/libcudd-build] Error 2
#4 32.82 make[1]: *** [CMakeFiles/Makefile2:215: search/CMakeFiles/libcudd.dir/all] Error 2
#4 32.82 make: *** [Makefile:91: all] Error 2
#4 32.82 Building configuration release.
#4 32.82 Executing command "cmake -G Unix Makefiles -DCMAKE_BUILD_TYPE=Release ../../src" in directory "/code/server/third_party/symk/./builds/release".
#4 32.82 Executing command "make -j4" in directory "/code/server/third_party/symk/./builds/release".
#4 32.82 Traceback (most recent call last):
#4 32.82   File "/code/server/third_party/symk/./build.py", line 166, in <module>
#4 32.82     main()
#4 32.82   File "/code/server/third_party/symk/./build.py", line 162, in main
#4 32.82     build(config_name, CONFIGS[config_name], make_parameters)
#4 32.82   File "/code/server/third_party/symk/./build.py", line 139, in build
#4 32.82     try_run([MAKE] + make_parameters, cwd=build_path)
#4 32.82   File "/code/server/third_party/symk/./build.py", line 109, in try_run
#4 32.82     subprocess.check_call(cmd, cwd=cwd)
#4 32.82   File "/usr/local/lib/python3.10/subprocess.py", line 369, in check_call
#4 32.82     raise CalledProcessError(retcode, cmd)
#4 32.82 subprocess.CalledProcessError: Command '['make', '-j4']' returned non-zero exit status 2.
#4 ERROR: process "/bin/sh -c scripts/build-submodules.sh" did not complete successfully: exit code: 1

More investigation is needed.

The issue was caused by local make cache. I will add an extra instruction to README.md to prevent users from experiencing this issue.


Add deleting confirmation step to Longhorn uninstallation

longhorn/longhorn#4509

May need to update default-setting.yaml as well.


Delete unused Google Maps Api and unnecessary links/references required by Advanced Search and preferentially substitute with loklak integrated solution

Delete unused Google Maps Api and unnecessary links/references e.g.
http://maps.googleapis.com/maps/api/js?key=AIzaSyBE1JH_NZ0LvGeGAjV4n78pH_t7jkeKPCo&libraries=places&sensor=true" is on the search page. Why?
http://test.loklak.net/search?q=obama
According to @fuksi This is required for Autocompletion of Advanced Search

HAH reverse geocoding!

{
  "locations" : {
    "iPhone: 37.313690,-122.022911" : {
      "place" : [ "Cupertino", "Kupertino", "ku bi di nuo", "kupachino", "kupartino", "kupeotino", "kwbyrtynw  santa klara  kalyfwrnya", "kwprtynw  kalyfrnya", "kyuparatino", "qwprtynw", "Купертино", "Купертіно", "קופרטינו", "كوبيرتينو، سانتا كلارا، كاليفورنيا", "کوپرتینو، کالیفرنیا", "کپرٹینو", "कुपर्तिनो", "कूपर्टीनो", "क्युपरटिनो", "クパチーノ", "庫比蒂諾", "쿠퍼티노" ],
      "population" : 58302,
      "location" : [ -122.03218088579932, 37.323001742979045 ],
      "mark" : [ -122.03218088579932, 37.323001742979045 ]
    },
    "ÜT: 19.109458,72.825842" : {
      "place" : [ "Mumbai", "Asumumbay", "BOM", "Bombai", "Bombaim", "Bombaj", "Bombay", "Bombaya", "Bombej", "Bombejus", "Bombėjus", "Bumbaj", "Bůmbaj", "Dakbayan sa Bombay", "Gorad Mumbai", "Lungsod ng Mumbai", "Moembaai", "Mumbai - मुम़बई", "Mumbaj", "Mumbaja", "Mumbajo", "Mumbajus", "Mumbay", "Mumbaî", "Numbai", "Vomvai", "bamba'i", "bmbyy", "gretara mumba'i", "meng mai", "mmbay", "mmbyy", "mu0bai", "muba'i", "mum bi", "mumba'i", "mumbai", "mumpai", "munbai", "mwmbay", "mwmbyy", "mymbais", "pullapa mumba'i", "Βομβάη", "Бомбай", "Бомбей", "Горад Мумбаі", "Мумбаи", "Мумбай", "Мумбаі", "Мумбаї", "Мумбај", "Մումբայ", "מומבאי", "מומביי", "بمبئی", "بَمبَے", "ممبئي", "ممبئی", "ممبای", "مومباى", "مومباي", "مومبای", "މުންބާއީ", "ग्रेटर मुम्बई", "बम्बई", "मुंबई", "मुम्बई", "পুল্লাপ মুম্বাই", "মুম্বই", "মুম্বাই", "ਮੁੰਬਈ", "મુંબઈ", "ମୁମ୍ବାଇ", "மும்பை", "ముంబై", "ಮುಂಬೈ", "ಮು೦ಬೈ", "മുംബൈ", "มุมไบ", "འབོམ་སྦེ", "မွမ်ဘိုင်းမြို့", "მუმბაი", "ムンバイ", "孟买", "뭄바이" ],
      "population" : 12691836,
      "location" : [ 72.88260637451083, 19.072830155060075 ],
      "mark" : [ 72.88260637451083, 19.072830155060075 ]
    }
  }
}

I don't think these are accurate data for autocompletion.
@mariobehling, At some point we're depending on another API and libraries, e.g OSM, what is important now is that the API should be free and last for a long time.  Anyway I understand. I'll try to find a open source service that we can implement locally.

@Orbiter What are your ideas?

@fuksi Could you please explain again, whey this is showing up on all kinds of pages?

There are 3 places we placing our dependencies/libraries in our application:

Node modules, will be included when we required in our code (angular components)
Components those not available from node package indexing, placed manually in app/components
Dynamic components: those changes through time, can't be included with a file, but has to go through a CDN (else it can be outdated very fast).

TL&DR version: the Google API script is showing because it's included in the third way. The rest of deps/libs are also included at the same time in the main script. You can't see it because we have automation to bundle the script for less http requests. If we don't bundle, the you would see 20-30 <script> tags, just like to Google API
MORE DETAILEDS
It's possible to place the <script> tag of the Google API in where it is needed (not recommended), but not with an angular application. Because angular application is compiled right after DOM (html) is loaded. Meaning when we're opening the home view, in the background, everything is already compiled for the rest of the views. OSM Leaflet js is already used even we're still in home view, and of course advanced search view is also loaded, and this view require Google API object in global`.
It's the way a SPA is, and it makes it possible to switch view fast rather reloading the whole application.
ANYWAY Let's move on the the internal solution using loklak server geolocation :)

@Orbiter You have mentioned that why do I need lat/long included for this query: http://loklak.org/api/suggest.json?q=singa
I can clarify the steps I intend to implement again: In advanced search, when a user use location search

He/she will enter a city name
Said, he/she wrotes "Hel"

A request will be sent to server for suggestion of location "Hel"
A list will be show from the suggestion for the user to choose

Get lat/long from chosen location (Not available from the result from server)
Twitter defines the radius 20 miles by default, I'd allow user to choose radius (500km by default)
From radius and chosen location, I create a boundary for /location=and search

If I lat/long is not available, then I need near:location to be working. I believe this is working. But how near is computed at the moment?
http://loklak.org/api/search.json?timezoneOffset=-180&q=moi+near%3AHelsinki

@fuksi Thanks for outlining how you implemented it. It is great to learn lots of things in the process! So, as discussed, we have some of this functionality already on the loklak server and we want to use as much as possible the loklak server in order to stay independent. Most commercial Apis require payments at some points and we want to be independent. So, as loklak grows, the goal is to be able to support lots of users. Here, the feature we need from the Google Api is also relatively small. So, it sounds like it is possible to get this working without the Google Api! Thank you.

First solution here: https://github.com/loklak/loklak_webclient/pull/299


Issue deploying guestbook app

I'm getting this timeout error when trying to deploy the guestbook app (following the readme). I'm running on GCE.
2016/01/26 10:23:34 cannot deploy configuration named guestbook.yaml: Post http://localhost:8001/api/v1/proxy/namespaces/dm/services/manager-service:manager/deployments: net/http:  request canceled (Client.Timeout exceeded while awaiting headers)

I wonder if the problem is that the client is timing out while the resources are spinning up. Could you look at the manager logs and see if there are erros there? Or can you look at the state of the deployment.
Show your deployments: (depending on where you run, might need to specify --service)
dm list
and then look at the state of the deployment
dm get
My hunch is that this is related to #183

whoah!!!, sorry about the huge font. Was not trying to shout :(

examples [master]$ dm list
2016/01/26 10:50:16 cannot list deployments: Get http://localhost:8001/api/v1/proxy/namespaces/dm/services/manager-service:manager/deployments: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

pod logs for manager:
examples [master]$ kubectl logs manager-rc-hqjh5 --namespace=dm
2016/01/26 17:17:08 Version: 0.0.1
2016/01/26 17:17:08 Listening on port 8080...

hahaha no worries. I didn't think you were shouting, just trying to help me read better :eyes:

@michelleN was this issue fixed by the fix to #183?


ZSH Completions do not work

ZSH completions do not function, with error _arguments:comparguments:327: invalid argument: loading[the first file, use with --verbose ]
The commands in completion.zsh produce arguments list with contents:
...
--no-render[Do not render anything and quit right after ]
loading[the first file, use with --verbose ]
--max-size[<size in Mib>  Maximum size in Mib of a file to load, ]
...
--quiet[Enable quiet mode, which supersede any ]
using[`--verbose=quiet` instead)]
--progress[Show progress bar]

Where the lines beginning with loading and using are not valid options to _arguments. (And the help-text for multi-line blocks like --no-render or --max-size or --quiet are truncated and not very helpful)
They are included because the help-text for --no-render and --quiet include --, so their help-text contents are mangled into invalid options. See:
https://github.com/f3d-app/f3d/blob/b53ba1ae3a60e244d55291ae1598df81635b8366/application/F3DOptionsParser.cxx#L312
https://github.com/f3d-app/f3d/blob/b53ba1ae3a60e244d55291ae1598df81635b8366/application/F3DOptionsParser.cxx#L321
To reproduce:

Open a zsh shell
Type f3d
Press tab (or other configured completion key)

System Information:
Ubuntu 22.04

zsh 5.9
f3d 2.3.0

MacOS 12.7

zsh 5.8
f3d 2.3.1

Additional Context:
In Nov 2022 I created https://github.com/f3d-app/f3d/pull/462 to get zsh completion partially working. At some point I upgraded and the mentioned --no-render and --quiet changes broke it again. In that PR I attempted to merge multi-line helptext, but failed due to compatibility issues on MacOS. That multi-line merging should fix this issue and also enhance completion helptext, since only the start-of-line -short and --long options would be matched; -- in helptext would be only part of the helptext.
So since I have my MacOS environment working to test compatibility locally, I'll spend some time fixing that multi-line support code and create a PR if I'm successful. I'm not sure how much availability I'll have to work on that and when the PR will come, but I wanted to log the issue and describe the bug here for now.
My original attempt at multi-line support is at https://github.com/f3d-app/f3d/commit/bc78f68ae15b87daf510aaafa19cc18dc96f5200; but it does not function on MacOS.

@Meakk didn't you fix this recently?

the issue looks pretty similar though, would the fix be similar ?
https://github.com/f3d-app/f3d/pull/1325

I think a fix can probably be done with the same strategy. It looks like the fish completions still truncate multi-line helptext though, it might be nice to implement that and apply that fix to both fish and zsh completions.
However since the fix for #1325 was so small I'll check if a similar change can be applied to zsh for a quick patch.

I'll merge this since it is fixed but feel free to open another feature issue to improve the auto completion as you suggested @allemangD


Add got dependency

Fix https://github.com/przemyslawpluta/node-youtube-dl/issues/356

Ping maintainer @Kikobeats as this is critical.

sorry for the delay
released at v3.4.1


testsuite: Require failing commands to check output.

This requires that commands that expect an error (using with_status()) also check some part of the output, to ensure that the test is working correctly. As evidence by the few tests fixed here, it is dangerous to assume that the correct error will trigger.
Some of these check rustc error messages which is generally undesirable since they aren't always stable, but I think in the few cases they shouldn't be much of a problem. If that seems too risky, I can make them more generic.

r? @alexcrichton
(rust_highfive has picked a reviewer for you, use r? to override)

:pushpin: Commit f58d107e7c907063715622632e7d47f68a98ccc1 has been approved by dwijnand

SGTM.  We can always rethink the verification if it's too imposing.
@bors: r+

:hourglass: Testing commit f58d107e7c907063715622632e7d47f68a98ccc1 with merge 35b2b04157416196c2937dbf8e28755889fe3cce...


HDDS-10574. Improve TestObjectPut

What changes were proposed in this pull request?
Improve TestObjectPut:

reduce code duplication
avoid unnecessary mocking

This is in preparation for HDDS-10570.
https://issues.apache.org/jira/browse/HDDS-10574
How was this patch tested?
CI:
https://github.com/adoroszlai/ozone/actions/runs/8401371232

Can someone please review?  The goal of this change is to prepare this unit test for an upcoming bugfix (reducing change in the patch for the real fix).

@ivandika3 please take a look

Thanks @ivandika3 for the review, your PR is merged and this one is updated.
@duongkame can you please also review?

Thanks @hemantk-12, @ivandika3 for the review.