Mac OS X Change Desktop Background

Looks like you can change the desktop background pretty easily with the appscript plugin. I will put code up shortly to change the background to NASA's latest picture of the day, modifying this to allow for the JSA Earth picture is straightforward and is left as an exercise to you guys.

I'm not in favor of adding another dependency. Is current implementation not working for you?

No, it doesn't work under OS X. If you want to avoid a dependency, invoke osascript directly using subprocess or use pyobjc, included with the system since OS X 10.5

invoke osascript directly using subprocess

That's exactly what we're doing: https://github.com/boramalper/himawaripy/blob/master/himawaripy.py#L85
I have no idea what causes it. A wild question, what is your OS X and osascript version?

I'm closing the issue as there are no more answers for three days. Feel free to raise it again, if you need so.

I am having an issue with the mac os Implementation, it seems to go through the process of installation successfully:
`sudo python3 setup.py install
running install
running bdist_egg
running egg_info
writing dependency_links to himawaripy.egg-info/dependency_links.txt
writing requirements to himawaripy.egg-info/requires.txt
writing himawaripy.egg-info/PKG-INFO
writing entry points to himawaripy.egg-info/entry_points.txt
writing top-level names to himawaripy.egg-info/top_level.txt
reading manifest file 'himawaripy.egg-info/SOURCES.txt'
writing manifest file 'himawaripy.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.6-intel/egg
running install_lib
running build_py
creating build/bdist.macosx-10.6-intel/egg
creating build/bdist.macosx-10.6-intel/egg/himawaripy
copying build/lib/himawaripy/init.py -> build/bdist.macosx-10.6-intel/egg/himawaripy
copying build/lib/himawaripy/config.py -> build/bdist.macosx-10.6-intel/egg/himawaripy
copying build/lib/himawaripy/himawaripy.py -> build/bdist.macosx-10.6-intel/egg/himawaripy
copying build/lib/himawaripy/utils.py -> build/bdist.macosx-10.6-intel/egg/himawaripy
byte-compiling build/bdist.macosx-10.6-intel/egg/himawaripy/init.py to init.cpython-36.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/himawaripy/config.py to config.cpython-36.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/himawaripy/himawaripy.py to himawaripy.cpython-36.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/himawaripy/utils.py to utils.cpython-36.pyc
creating build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying himawaripy.egg-info/PKG-INFO -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying himawaripy.egg-info/SOURCES.txt -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying himawaripy.egg-info/dependency_links.txt -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying himawaripy.egg-info/entry_points.txt -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying himawaripy.egg-info/requires.txt -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying himawaripy.egg-info/top_level.txt -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/himawaripy-1.1-py3.6.egg' and adding 'build/bdist.macosx-10.6-intel/egg' to it
removing 'build/bdist.macosx-10.6-intel/egg' (and everything under it)
Processing himawaripy-1.1-py3.6.egg
Removing /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/himawaripy-1.1-py3.6.egg
Copying himawaripy-1.1-py3.6.egg to /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
himawaripy 1.1 is already the active version in easy-install.pth
Installing himawaripy script to /Library/Frameworks/Python.framework/Versions/3.6/bin
Installed /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/himawaripy-1.1-py3.6.egg
Processing dependencies for himawaripy==1.1
Searching for tzlocal==1.2.2
Best match: tzlocal 1.2.2
Processing tzlocal-1.2.2-py3.6.egg
tzlocal 1.2.2 is already the active version in easy-install.pth
Using /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tzlocal-1.2.2-py3.6.egg
Searching for pytz==2016.6.1
Best match: pytz 2016.6.1
Processing pytz-2016.6.1-py3.6.egg
pytz 2016.6.1 is already the active version in easy-install.pth
Using /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pytz-2016.6.1-py3.6.egg
Searching for python-dateutil==2.5.3
Best match: python-dateutil 2.5.3
Processing python_dateutil-2.5.3-py3.6.egg
python-dateutil 2.5.3 is already the active version in easy-install.pth
Using /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/python_dateutil-2.5.3-py3.6.egg
Searching for Pillow==3.3.0
Best match: Pillow 3.3.0
Processing Pillow-3.3.0-py3.6-macosx-10.6-intel.egg
Pillow 3.3.0 is already the active version in easy-install.pth
Installing thresholder.py script to /Library/Frameworks/Python.framework/Versions/3.6/bin
Installing pilfont.py script to /Library/Frameworks/Python.framework/Versions/3.6/bin
Installing pilprint.py script to /Library/Frameworks/Python.framework/Versions/3.6/bin
Installing pilconvert.py script to /Library/Frameworks/Python.framework/Versions/3.6/bin
Installing createfontdatachunk.py script to /Library/Frameworks/Python.framework/Versions/3.6/bin
Installing gifmaker.py script to /Library/Frameworks/Python.framework/Versions/3.6/bin
Installing pilfile.py script to /Library/Frameworks/Python.framework/Versions/3.6/bin
Installing pildriver.py script to /Library/Frameworks/Python.framework/Versions/3.6/bin
Installing explode.py script to /Library/Frameworks/Python.framework/Versions/3.6/bin
Installing viewer.py script to /Library/Frameworks/Python.framework/Versions/3.6/bin
Installing painter.py script to /Library/Frameworks/Python.framework/Versions/3.6/bin
Installing player.py script to /Library/Frameworks/Python.framework/Versions/3.6/bin
Installing enhancer.py script to /Library/Frameworks/Python.framework/Versions/3.6/bin
Using /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Pillow-3.3.0-py3.6-macosx-10.6-intel.egg
Searching for appdirs==1.4.0
Best match: appdirs 1.4.0
Processing appdirs-1.4.0-py3.6.egg
appdirs 1.4.0 is already the active version in easy-install.pth
Using /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/appdirs-1.4.0-py3.6.egg
Searching for six==1.10.0
Best match: six 1.10.0
Processing six-1.10.0-py3.6.egg
six 1.10.0 is already the active version in easy-install.pth
Using /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/six-1.10.0-py3.6.egg
Finished processing dependencies for himawaripy==1.1`
However, I can't find the executable (which -- himawaripy does not produce any results).
Any help will be greatly appreciated, thank you.

Hmm, I've never used a mac but let me try my best:
Try running: /usr/local/bin/himawaripy from your terminal. If it works, it works! Then follow the instructions.


initial commit for cli-app example to meilisearch-rust

Pull Request
What does this PR do?
Related to #247
issue: Create More examples
This PR is to help create another example of how to use the meilisearch-rust SDK. I created a simple command line search application showcasing the different fine tuning one can do with meilisearch using the Rust SDK. This is the initial commit for the cli-app

bors merge

There is a failing test with main

thread 'client::tests::test_list_all_indexes_raw' panicked at 'called Result::unwrap() on an Err value: ParseError(Error("invalid type: null, expected struct MeilisearchError", line: 1, column: 4))', src/client.rs:936:5

Do I have to change something? I'm unsure of what my pull request would affect in the tests

Let's see if it is a flacky test
bors try

bors try

Yeah, @salugi code changed nothing to the lib or the tests. It’s a flaky test 😩

bors r-

Well! Either flacky or github 🤷♀

bors merge

bors merge

bors merge

Hey @salugi, thanks a lot for your involvement in this repository!
We would love to do a shoutout to the community work on Twitter in the coming weeks!
Do you have a Twitter account? And if yes, can you please share it with us? 😇
In private by email if you are not comfortable letting it here. My email is on my GitHub profile.
See you soon 👋


Fix runtime error when proxy is empty

rp, err := proxy.RoundRobinProxySwitcher()
if err != nil {
	log.Fatal(err)
}

Code like this will cause a runtime error ,
try to fix this.

Hey @JohnZhao1208 , Thanks for this PR!  Looks like a good fix for this situation.  Could you please add a test case to cover your new code?


Added documentation for materialized-views workload group

Learn Build status updates of commit fd144dc:
:warning: Validation status: warnings

File
Status
Preview URL
Details

data-explorer/kusto/management/workload-groups.md
:warning:Warning

Details

data-explorer/kusto/management/materialized-views/materialized-view-overview.md
:white_check_mark:Succeeded

data-explorer/kusto/management/workload-groups.md

Line 63, Column 69: [Warning: bookmark-not-found] Cannot find bookmark '#request-limits-policy.md' in 'kusto/management/workload-groups.md'.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Learn Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel

Learn Build status updates of commit 83db0c5:
:warning: Validation status: warnings

File
Status
Preview URL
Details

data-explorer/kusto/management/materialized-views/materialized-view-overview.md
:warning:Warning

Details

data-explorer/kusto/management/workload-groups.md
:warning:Warning

Details

data-explorer/kusto/management/materialized-views/materialized-view-overview.md

Line 181, Column 44: [Warning: bookmark-not-found] Cannot find bookmark '#materializedviews-workload-group' in 'kusto/management/workload-groups.md', did you mean '#materialized-views-workload-group'?

data-explorer/kusto/management/workload-groups.md

Line 19, Column 165: [Warning: bookmark-not-found] Cannot find bookmark '#materializedviews-workload-group' in 'kusto/management/workload-groups.md', did you mean '#materialized-views-workload-group'?

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Learn Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel


Added Copy/Paste functionality to configuration profiles.

Overview

Added two buttons on the master configuration profile for options on how users would like to make their profiles. They can choose to copy from the default ones and customize, or create new profiles.

Configuration profiles now have copy/paste functionality.

Default Configuration Profiles will now show warnings with helpful hints about how to proceed.

All Configuration Profiles can be copied into a completely new asset.
Once a master configuration profile has been swapped out with a custom once, an option to replace default profiles appears.

Changes

Fixes: #2856
Fixed an issue where BoundarySystemIsEnabled wasn't checking if a profile was set.

I pulled this change and do not see the new buttons...  am I missing sonething?

Did you have custom profiles?

Did you have custom profiles?

My steps were:

Pull your branch
Load the project
Click Mixed Reality Toolkit > Configure
-- no copy button --

Note: My profiles are unlocked.

Lock the profiles and select the MixedRealityManager

Lock the profiles and select the MixedRealityManager's configuration profile.

Why do they have to be locked for this feature to work? It feels confusing. Also, shouldn't I be able to clone custom profiles?

Why do they have to be locked for this feature to work?

Because it only works if they're unlocked.

Because it's only meant to work if they're locked. That's by design.

I am not sure i agree with the design. i found it confusing why the behavior difference... i believe it will confuse our customers as well.

what is the difference between Copy and Create Copy From in the drop down menu?

This is simply a warning about the profile being one of the default ones. Users will get the choice to copy and Customize or simply create their own, or use the ones provided as is.
Every profile has this warning, but the master configuration profile is unique with these buttons because it's the only one that doesn't have a "Copy & Customize" button to press on the MixedRealityToolkit GameObject.

The full copy/paste exists as a context menu to the Object itself, so pressing the gear in the top right makes since cause it's the same way you'd copy and paste component values for anything else.

I'm open to updating the text to be "Clone & Customize" for the button.
and updating the context menu to read as "Create a Clone from Profile Values

Love this feature!

No one outside of our development team will likely unlock the profiles, nor should they (unless they're modifying it for a PR against the MRTK)

We can't prevent that. Having the copy button only appear when the profile is locked is confusing, since it's the "default" profile regardless of locked state, and will be overwritten in a Toolkit update.
It's almost more important to provide information about creating a copied profile in the unlocked state, since that's the "danger" state where you might make changes that won't persist.

Having the copy button only appear when the profile is locked is confusing, since it's the "default" profile regardless of locked state

This is the root of my confusion. There is no easily discoverable way to set isCustomProfile to true if the Copy button is hidden when profiles are unlocked.
I would be 100% in support of this change if the copy button existed in both the locked and unlocked states.

I disagree as the only state a new profile is in is isCustomProfile==tue

I would be 100% in support of this change if the copy button existed in both the locked and unlocked states.

Technically the buttons are always there in the context menu. But sure I'll take a PR with your suggested edits.

@davidkline-ms added button visibility when unlocked.

@davidkline-ms added button visibility when unlocked.

Great! i'll try it at my first opportunity,

@davidkline-ms going to let you test and merge this then satisfactory :)

Just pulled this PR and I do not see copy buttons. Tested the profiles being locked and unlocked.

wait... I may have opened the wrong branch... let me double-check

Yep. Wrong branch. Buttons appear in both states. Thanks!

Will this find its way into the mrtk_development branch or will the mrtk_2018beta_stabilization be the most recent branch?


[APPM-1622] storagePath of rxts common to API Manager and APP manager should be unique from each other

Currently, the storagePaths of the following rxts are the same for APP manager and API manager.   * documentation * provider * reply * topic   In case we add a resource for any of the rxts types above it would save to a common location. Assume the below scenario.  Mount the same governance registry to both API Manager and APP Manager instance Startup the API Manager server first and it would write the content of the documentation.rxt which resides under the location APIM-Home/repository/resources/rxts to the registry under the path /_system/governance/repository/components/org.wso2.carbon.governance/types/documentation.rxt Then start up the APP Manager server But when you add a document through the APP Manager instance it would save the document resource under /_system/governance/apimgt since this is what's given in the documentation.rxt Then when you try to delete the document, it would look for all the artifacts under /_system/governance/appmgt and since it's available under /_system/governance/apimgt instead, it would throw the below exception.   Caused by: org.wso2.carbon.registry.core.exceptions.ResourceNotFoundException: Resource does not exist at path /_system/governance/appmgt/applicationdata/provider/admin/RaviApp2/1.0.0/documentation/asdsa at org.wso2.carbon.registry.core.jdbc.handlers.builtin.MountHandler.get(MountHandler.java:449) at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.get(HandlerManager.java:2444) at org.wso2.carbon.registry.core.jdbc.handlers.UserDefinedHandlerManager.get(UserDefinedHandlerManager.java:200) at org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycleManager.get(HandlerLifecycleManager.java:944) at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.get(EmbeddedRegistry.java:512) at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.getGhostResourceFromCache(CacheBackedRegistry.java:194) at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.get(CacheBackedRegistry.java:167) at org.wso2.carbon.registry.core.session.UserRegistry.getInternal(UserRegistry.java:620) at org.wso2.carbon.registry.core.session.UserRegistry.access$400(UserRegistry.java:60) at org.wso2.carbon.registry.core.session.UserRegistry$5.run(UserRegistry.java:603) at org.wso2.carbon.registry.core.session.UserRegistry$5.run(UserRegistry.java:600) at java.security.AccessController.doPrivileged(Native Method) at org.wso2.carbon.registry.core.session.UserRegistry.get(UserRegistry.java:600) at org.wso2.carbon.appmgt.impl.APIProviderImpl.removeDocumentation(APIProviderImpl.java:1049) ... 65 more   The same behaviour can be seen from API Manager side if you start up the App Manager instance first Reference: https://wso2.org/jira/browse/APPM-1622

Not related to IoT server, hence closing the issue.


Add PyCall RHS

In the spirit of diffeqpy, plug in a Python RHS for an ODE or discrete system rather than a Julia one.

The following works:
using OrdinaryDiffEq
using ModelingToolkit
using PythonCall

@pyexec """
def sir_ode_py(u,p,t):
    S = u[0]
    I = u[1]
    R = u[2]
    N = S+I+R
    beta = p[0]
    c = p[1]
    gamma = p[2]
    dS = -beta*c*I/N*S
    dI = beta*c*I/N*S - gamma*I
    dR = gamma*I
    return [dS,dI,dR]
""" => sir_ode_py

sir_ode_jl(u,p,t) = pyconvert(Array, sir_ode_py(u, p, t))

δt = 0.1
tmax = 40.0
tspan = (0.0,tmax)
u0 = [990.0,10.0,0.0] # S,I,R
p = [0.05,10.0,0.25] # β,c,γ
prob = ODEProblem{false}(sir_ode_jl, u0, tspan, p)
@named sys = modelingtoolkitize(prob)
prob_mtk = ODEProblem(sys, u0, tspan, p)
sol_mtk = solve(prob_mtk, Tsit5(), dt = δt)

I need to add an in-place version too.

Closed with 8045d5c020b47bbb8443622edff787f749cf1f92


Clam and SoDP use total healing before BoL reduction.

Closes https://github.com/genshinsim/gcsim/issues/2160

Blame Charlie if this is wrong


Needed dependency '@resvg/resvg-js-linux-x64-gnu' marked as optional

We did an update of svg-sprite from version 1.5.4 to version 2.0.2 and afterwards we had the issue that our build failed with the error message:

2022-11-29 14:11:07.527 - error: Optimizing "setting.svg" with SVGO failed with error "Error: Cannot find module '@resvg/resvg-js-linux-x64-gnu'.

Our CI uses npm ci --omit=optional to skip dependencies necessary only on developer machines.
In this case however, the @resvg dependencies are necessary to the build with svg-sprite, which is why they should not be marked as optional.

@yisibl Hello! Can you please check this? I think optionalDependencies can't be omited in resvg package. What can you suggest? Thanks

We're facing the same issue in our atos-parallel project...
It seems that this is the intended behavior from napi-rs though.
We use optional dependencies for developer helper tools like commit hooks.
Since those dependencies are not necessary on CI, we skip installing them to save time and bandwidth.

So a solution on resvg-js level would be highly appreciated 😊

If don't distribute native addons with optionalDependencies, the only other way is to distribute it with postinstall scripts, which is harmful to the developer experience and also introduces unnecessary dependencies for runtime (only for download binaries in postinstall), and can't be omitted at all.

There is an RFC in npm which may solve this problem in future: https://github.com/npm/rfcs/pull/519


gradle:install (& rake) Failing

Cannot rake, getting this error:

API 23 Installed through manager via motion android-setup.
Appears to be installed in Manager...

@fvonhoven  It's a RubyMotion error, probably related to the fact that Marshmallow has only been released few hours ago and is not yet supported.


Visual Studi Code Takes To long to open

Issue Type: Performance Issue
Every time I logged in into my computer and I boot it up, when i try to open the app, it has slow start up and some times it keeps asking do i ha ve to keep waiting or reopen the app.
VS Code version: Code 1.46.1 (cd9ea6488829f560dc949a8b2fb789f3cdc05f5d, 2020-06-17T21:13:20.174Z)
OS version: Windows_NT x64 10.0.18362

System Info

Item
Value

CPUs
Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (4 x 2712)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: enabledrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_off_okwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
7.89GB (3.60GB free)

Process Argv

Screen Reader
no

VM
0%

Process Info
CPU %	Mem MB	   PID	Process
    2	    79	   892	code main
    0	   175	   564	   gpu-process
    0	    25	  2392	   utility
    2	    64	  4336	   window (Issue Reporter)
    0	    73	  5052	   shared-process
    0	   183	 10460	   window (main.js - DicodingBooks - Visual Studio Code)
    0	     5	  2836	     console-window-host (Windows internal process)
    0	     4	  4856	     C:\WINDOWS\System32\cmd.exe
    0	    11	  7972	     watcherService
    0	    11	  1800	       console-window-host (Windows internal process)
    0	    38	  8808	     searchService
    0	    86	 10656	     extensionHost
    0	    36	   856	       electron_node tsserver.js
    0	    36	  3824	       electron_node tsserver.js
    0	    14	 10800	   electron-crash-reporter

Workspace Info
|  Window (main.js - DicodingBooks - Visual Studio Code)
|    Folder (DicodingBooks): 16 files
|      File types: js(6) html(2) json(2) css(1)
|      Conf files: package.json(1);

Extensions (19)

Extension
Author (truncated)
Version

code-gnu-global
aus
0.2.2

npm-intellisense
chr
1.3.0

path-intellisense
chr
2.2.1

vscode-eslint
dba
2.1.5

vscode-babel-coloring
dza
0.0.4

vscode-npm-script
eg2
0.3.12

code-runner
for
0.10.0

search-node-modules
jas
1.3.0

java
red
0.63.0

LiveServer
rit
5.6.1

vscodeintellicode
Vis
1.2.8

vscode-java-debug
vsc
0.26.0

vscode-java-dependency
vsc
0.10.2

vscode-java-pack
vsc
0.9.1

vscode-java-test
vsc
0.23.0

vscode-maven
vsc
0.22.0

vscode-icons
vsc
10.1.1

nodejs-extension-pack
wad
0.1.9

JavaScriptSnippets
xab
1.8.0

(1 theme extensions excluded)

If you start code.exe with the CLI flag --disable-extensions is it fast enough? If so I suggest you create a scratch XYZ.code-workspace file, relaunch normally, then disable half of your extensions for this workspace only. Now restart VS Code. If still slow, disable half of the remaining extensions (only for this workspace) and restart. If the half you disabled last time included the one previously making startup slow, re-enable half of the half. Repeat this bisect until you pinpoint the culprit.
Using the XYZ.code-workspace means you don't have to remember which extensions are globally disabled.

So are you saying that I should create a new workspace? and in that new workspace I should disable all the extentions so that when I close the app and I  want to use VS Code again it should open the xyz.code workspace and theoretically have a better start up.

Can you follow this wiki and post the results back here to understand more about why performance is so bad for you: https://github.com/Microsoft/vscode/wiki/Performance-Issues
Thanks!


Don't select json files UI

per #984, dont let the "Formatted/Raw" buttons be selectable, so when you cmd+a you just get the content.

@msfeldstein Thanks! I ended up doing basically this but using the CSS rules. Closed!


Fix bug: LIMITTIMEILLEGAL when edit limit_time

Codecov Report

Merging #11 (f1e6fb1) into main (3c67bb8) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main      #11   +/-   ##
=======================================
  Coverage   93.27%   93.27%
=======================================
  Files          17       17
  Lines        1055     1056    +1
  Branches      160      160
=======================================
+ Hits          984      985    +1
  Misses         62       62
  Partials        9        9

Impacted Files
Coverage Δ

parent_control/my_router/views.py
93.40% <100.00%> (+0.01%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3c67bb8...f1e6fb1. Read the comment docs.


Update install-the-tools.md

Updating the docs to account for HoloLens 2 Emulator availability.

Docs Build status updates of commit bf09e98:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

mixed-reality-docs/install-the-tools.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


False Positive REQUEST-941-APPLICATION-ATTACK-XSS / 941101 With Referer Headers With a Space and On

Description
This is not a new issue; it has been encountered several times before as described in these issues:

https://github.com/coreruleset/coreruleset/issues/2219
https://github.com/SpiderLabs/ModSecurity/issues/2426
Probably several hundred more.

I wanted to add some additional analysis as well as a description for a small test case:
Assume you have a Referer header of: https://example.com/api?var=Press Onward&var=Son and the above rule enabled. This should trigger the rule.
The triggers appear to be:

A GET Variable value that has a space in it
The Space must be followed by two letters On and something else (Onward, One, Once, Ontological, etc)
The GET Variable must be followed by another get variable

The issue appears to be with the @detectXSS operator (https://github.com/SpiderLabs/ModSecurity/blob/c3b7a7f4f0cc5b14fd133cd27748121cbff0fe6a/src/operators/detect_xss.cc#L32) however if you look at the code it really is just calling down to libinjection_xss.
Looking at that code (assuming its this maintained fork: https://github.com/libinjection/libinjection/blob/main/src/libinjection_xss.c) the code gets a little hairy but if you use the following test program you can see where the error occurs:
int main()
{
    std::cout << "String contained XSS Injection";
    std::cout << libinjection_xss("https://example.com/api?var=Press Onward&var=Son", 48);
}

Triggers the detection of JavaScript On: https://github.com/libinjection/libinjection/blob/49904c42a6e68dc8f16c022c693e897e4010a06c/src/libinjection_xss.c#L343
The bug is a pretty bad combination of things: having spaces in GET variables, the length of the variable, an underlying third party library, and difficult to reproduce scenarios.
I am able to reproduce this on demand in an internal application with Azure's WAF (albeit with a much more complicated request).
I wanted to at least point someone in the right direction (pinging @zimmerle) at minimum the library author is aware of at least one place that this manifests (See https://github.com/libinjection/libinjection/issues/9) but this can really trigger in a number of places.
Confirmation
[x] I have removed any personal data (email addresses, IP addresses,
passwords, domain names) from any logs posted.

One problem with libinjection is maintenance. While there were some additions and people tried to fix things, there have been no additional mergers and or tests in the library.

@zimmerle: I remember you taking over maintenance of libinjection from Nick Galbreath 2 years ago or so. Could you give us a status of that?

Yes, it is an unfortunate situation. We did a workshop on the libinjection situation at our recent CRS developer summit.
Unfortunately, the team is torn what to do about it. There are people who would like CRS to get involved and others who would rather keep away from libinjection. We therefore postponed any action as a team. And unless an individual picks this up I can't see any movement in the foreseeable future.
Very sorry about the bad news.

@dune73 Hey it happens, no worries.
As far as the bug/false positive report goes (this report) do you want me to keep it open? I don't mind coming and unmarking it as stale every 120 days. I think, if possible, we should really link any duplicates of this to either this issue or another one that explains this as known.

There is not much we can do, other than keep it in the KNOWN_BUGS.

Yes.
Sorry @aolszowka.


Hold Command+Q to Quit Application in Karabiner Elements

I was wondering how I could activate Hold Command+Q to Quit Application? I know the old Karabiner had it but I don't see it in Karabiner Elements. Can someone point me in the right direction?

What was the solution?

@baurmatt I use another app for that. https://github.com/dteoh/SlowQuitApps

Thanks! :) But i would prefer to not have another tool running on my system. Lets see if tekezo replys to https://github.com/tekezo/Karabiner-Elements/issues/1020

@baurmatt Glad to help! :) I agree that it would be better to have all the keyboard modifications in one program. But to tell you from experience, I've been using this SlowQuitApps since Karabiner Elements came out and it works perfectly. Hopefully @tekezo replies.


Port to Nuvola SDK

https://github.com/tiliado/nuvolasdk
https://groups.google.com/d/msg/nuvola-player-devel/NVsbGtIZf6A/x9MtIkSfDAAJ

Author: Jiří Janoušek<EMAIL_ADDRESS>Reviewed by: FIXME

When merging this branch, please follow Guidelines for Merge Commits, especially:

Don't merge directly in GitHub as it produces a crappy commit message.
The title of the pull request becomes the merge commit title (the first line of the merge commit).
The description of the pull request up to the first horizontal separator/line becomes the merge commit body (separated from the title by a blank line).
Fill in the Reviewed by line and add the Pull Request line.

Hello @skyghis. I'm going to merge this pull request on Saturday, February 11th, unless you have any objections or tell me that you need more time to review the changes. If you agree with the proposed changes, but don't have time to merge them, let me know and I'll merge the branch by myself.

Thanks @skyghis.


Fails to find the MathLibrary.h file in #include directive

The title is correct.  After much consternation and head scratching, trying to follow this tutorial as it is written (two solutions), as a single solution with two projects and verifying the directories over and over again. The problem remained; the #include directive of "MathLibary.h" couldn't be found.
Finally, I got it to work by changing the "solution platform" to x86 from x64.  No where in the tutorial was I able to find that this DLL only can work on x86.  I'd think this would be important and worth mentioning within the article.

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

ID: 08c574a2-cef0-ab13-7375-55851f966ef6
Version Independent ID: fe3421c7-e9f4-4986-589f-fadaedce583e
Content: Walkthrough: Create and use your own Dynamic Link Library (C++)
Content Source: docs/build/walkthrough-creating-and-using-a-dynamic-link-library-cpp.md
Service: visual-cpp
Sub-service: tools
GitHub Login: @TylerMSFT
Microsoft Alias: twhitney

Moved this issue to an internal work item tracking system because we are moving away from using GitHub issues to track C++ doc work. Will address the platform issue.


nixos/timesyncd: does not use the NTP servers advertised by DHCP

Describe the bug
timesyncd does not use the NTP servers advertised by DHCP.
Steps To Reproduce
Steps to reproduce the behavior:

Boot a NixOS machine in a network advertising NTP servers by DHCP

Observe that timesyncd uses the NTP servers configured with services.timesyncd.servers:
[root@mymachine:~]# cat /etc/systemd/timesyncd.conf
[Time]
NTP=0.nixos.pool.ntp.org 1.nixos.pool.ntp.org 2.nixos.pool.ntp.org 3.nixos.pool.ntp.org

[root@mymachine:~]# timedatectl show-timesync
LinkNTPServers=<IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS>
SystemNTPServers=0.nixos.pool.ntp.org 1.nixos.pool.ntp.org 2.nixos.pool.ntp.org 3.nixos.pool.ntp.org
FallbackNTPServers=0.nixos.pool.ntp.org 1.nixos.pool.ntp.org 2.nixos.pool.ntp.org 3.nixos.pool.ntp.org
ServerName=0.nixos.pool.ntp.org
ServerAddress=<IP_ADDRESS>
RootDistanceMaxUSec=5s
PollIntervalMinUSec=32s
PollIntervalMaxUSec=34min 8s
PollIntervalUSec=1min 4s
NTPMessage={ Leap=0, Version=4, Mode=4, Stratum=2, Precision=-26, RootDelay=991us, RootDispersion=869us, Reference=4D28E279, OriginateTimestamp=Fri 2024-08-16 07:18:40 UTC, ReceiveTimestamp=Fri   2024-08-16   07:18:40 UTC, TransmitTimestamp=Fri 2024-08-16 07:18:40 UTC, DestinationTimestamp=Fri 2024-08-16 07:18:40 UTC, Ignored=no, PacketCount=1, Jitter=0 }
Frequency=-2844436

[root@mymachine:~]# timedatectl timesync-status
       Server: <IP_ADDRESS> (0.nixos.pool.ntp.org)
Poll interval: 1min 4s (min: 32s; max 34min 8s)
         Leap: normal
      Version: 4
      Stratum: 2
    Reference: 4D28E279
    Precision: 1us (-26)
Root distance: 1.364ms (max: 5s)
       Offset: -9.797ms
        Delay: 12.210ms
       Jitter: 0
 Packet count: 1
    Frequency: -43.403ppm

Expected behavior
timesyncd should use the NTP servers advertised by DHCP.
Additional context
This is because the servers explicitly set in NTP= (see man timesyncd.conf(5)) take precedence over NTP servers advertised by DHCP.
A simple workaround is to set services.timesyncd.servers = [];.
Since the 0.nixos.pool.ntp.org, 1.nixos.pool.ntp.org, 2.nixos.pool.ntp.org and 3.nixos.pool.ntp.org are already set as compile-time fallback servers, why is not [] the default value for services.timesyncd.servers?
Another solution would be to modify the module to achieve the equivalent of:
services.timesyncd = {
  servers = [];
  extraConfig = ''
    FallbackNTP=${lib.concatStringsSep " " config.networking.timeServers}
  '';
};

Notify maintainers

@flokli @blitz @andir @cdepillabout
Metadata
Running NixOS 24.05 with systemd 255 (255.6).
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
error:
       … <borked>

         at «none»:0: (source not available)

       … while calling the 'import' builtin

         at «string»:1:18:

            1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (nix-info) ]; } ""
             |                  ^

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override

Add a :+1: reaction to issues you find important.

This looks like a good idea. Can you send a PR, and maybe update the option description?

No, I did not, but the fallback approach seems nicer. Please copy (and update) the release note entry from here, though.

I meant to close https://github.com/NixOS/nixpkgs/pull/335802, not this issue. Sorry for the noise.


Fix/hotfix 08112022

But Netraj, if I merge this PR directly to the development branch, it might cause issues in the sprint23 branch later.
Also, I didn't create any ticket for this... because most of the fixes are just typos


[Win 10] amazon_fresh_delivery_slot_chrome.py Crashes after first reset

soup = bs4.BeautifulSoup(html)
Traceback (most recent call last):
  File "amazon_fresh_delivery_slot_chrome.py", line 61, in <module>
    getWFSlot('https://www.amazon.com/gp/buy/shipoptionselect/handlers/display.html?hasWorkingJavascript=1')
  File "amazon_fresh_delivery_slot_chrome.py", line 31, in getWFSlot
    no_slots_from_web = driver.find_element_by_xpath('/html/body/div[5]/div/div/div[2]/div/div/form/div[3]/div[4]/div/div[2]/div[2]/div[6]/div/div[2]/div/div[2]/div/div[20]/div[1]/div[1]/div/div/div/span').text
  File "C:\Users\Aditya\Desktop\Whole-Foods-Delivery-Slot-master\Whole-Foods-Delivery-Slot-master\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 394, in find_element_by_xpath
    return self.find_element(by=By.XPATH, value=xpath)
  File "C:\Users\Aditya\Desktop\Whole-Foods-Delivery-Slot-master\Whole-Foods-Delivery-Slot-master\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 978, in find_element
    'value': value})['value']
  File "C:\Users\Aditya\Desktop\Whole-Foods-Delivery-Slot-master\Whole-Foods-Delivery-Slot-master\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\Users\Aditya\Desktop\Whole-Foods-Delivery-Slot-master\Whole-Foods-Delivery-Slot-master\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[5]/div/div/div[2]/div/div/form/div[3]/div[4]/div/div[2]/div[2]/div[6]/div/div[2]/div/div[2]/div/div[20]/div[1]/div[1]/div/div/div/span"}
  (Session info: chrome=81.0.4044.92)

I am able to sign in and go to the Schedule page, but it crashes after the first refresh of the page with the above stacktrace
OS: Windows 10
Browser: Chrome 81
Driver: ChromeDriver 81
URL: Amazon.com/.../

It works end to end on my machine, I think what happened in your case, there was a slot that opened up. I was catching the wrong exception. Fixed it. Thanks for pointing out.


[Bug]: Stake appears disabled the merge button to add new funds to the stake

Issue description

Expected behaviour
be able to stake with new funds
Actual behaviour
I can't add anything to the stake
Can the issue reliably be reproduced?
No
Steps to reproduce the issue
No response
Diagnostics
No response
Errors
No response
Duplicate declaration

[X] I have searched the issues tracker this issue and there is none

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Hello, can you please try to create a new profile and restore your wallet with your stronghold backup file + password?

Hello, can you please try to send all your funds to a new wallet inside your profile? After this you can stake with the new wallet. But make sure to create a wallet INSIDE your profile.

This should be fixed in the latest release


improve readme for advanced examples

make it for clear what extensions are in use

moved most examples to blockly, though


Fix UIExample typos: hightlight -> highligh

Follow-up PR for fixing typos in #5931
Test plan (required)
This PR contains only copy changes, so no additional testing is required.
Code formatting
This PR code style match the desired style guide.
cc @mkonicek

@facebook-github-bot shipit


#92 - Part 1 - use builders when provisioning topics

Part of #92
Switch topic provisioning to use builders (note - limited implementation  only supports new topic creation atm)

@big-andy-coates  - builders, writers, and all the things - or the start of them... lol


More flexible/powerful attention mechanism for longer videos?

The proposed SCAttention is very computationally efficient, but it intuitively seems to be insufficient when generating slightly longer videos. Ex: attending only on the previous frame is not sufficient for establishing the direction of movement of an object.
I guess this works in the provided examples because the videos only have 8 frames, so the first video frame combined with the previous frame might be sufficient for that.  But in longer videos, the first frame of the video starts to become kind of irrelevant.
Have you considered or tried using other attention masks such as Local Attention (sliding window) or other non-quadratic sparse attention mechanisms? Any thoughts on this?
Thanks and congrats for the great work!

Thank you for the comment. Currently, Tune-A-Video only generates short video clips. The creation of long-form videos with complex dynamics is a challenging task, and we are actively exploring this scenario.

is possible to generate longer videos(>8 frames)?   i had tried to train the mode with “n_sample_frames=16” and inference with “video length=16”, but the inference video is full black.

@jorgemcgomes Very valuable exploration，can you provide train/infer scripts ?

@zcdliuwei There's really nothing special to it, I just increased the train_data/n_sample_frames and validation_data/video_length

@jorgemcgomes  It's very kind of you. thank you for sharing. I will try your method soon !

@jorgemcgomes Have you tried looking at the unofficial implementation ? The maintainer uses the PseudoConv3d for conv and Spatio Temporal Attention which seem to provide more of what you're looking for.

@ExponentialML I didn't know about that one. Thanks, I will check it out. But comparing the code, it seems that both implementations use exactly the same kind of attention.

@ExponentialML I didn't know about that one. Thanks, I will check it out. But comparing the code, it seems that both implementations use the same kind of attention?

No problem. It's a bit difficult to see the subtle differences as this repository seemed to have been derived from the official one. When testing both, I seem to get very different results, with the unofficial repository preserving the prior better.
InflatedConv3d Implementation
PseudoConv3d Implementation
There are some more differences in multiple parts of the code, but those are some of the more apparent ones.

Hi folks, we're excited to announce that we've made updates to our codebase that have resulted in improved video consistency. These enhancements would be beneficial for generating longer videos (e.g., 64 and more frames).

Hi. May I ask what GPU type you are using? I trained the modal with 3090 but the maximum number of n_sample_frames is 3. CUDA out of memory for n_sample_frames 4. I didn't use xformers and I wonder whether the problem derives from this.

@jorgemcgomes OK thank you, I'll try this method


Update en.yml

Have updated the calls received text to make it more descriptive. Latest round of UR showed that users aren't sure why they should care about this metric.

Closing this in preference to #61, which incorporates @luciawhittaker's changes along with the ability to include paragraphs (by supporting HTML metric guidance).


Feature Request: Stripe Connect but for Instant DB

Feature request: Stripe Connect but for Instant DB
BLUF
We’d like to provision Instant DB accounts and apps on behalf of our users, similar to how Squarespace can provision Stripe accounts and payments on behalf of their users.
Need
GPT Engineer lets you build and deploy a complete frontend app using only prompts (powered by LLMs). For adding persistence we today support a Supabase integration. This requires the user to go into supabase, create an account, and configure the schema and then use the API keys to Connect to GPT Engineer. This is great for users that already use Supabase or who want a lot of control. But many users don’t care about what a persistence layer looks like as long as it gets the job done and would prefer minimal friction. We believe that Instant DB could unlock this low friction use case if there was a way for us to programmatically create Instant DB apps on behalf of our users. We don't want our users to have to go to instantdb.com and sign up, we'd want to sign up for them, ideally without them needing to do anything.
 We naturally have our users already validated so either we establish trust that way or we device some other way of establishing trust. Ideally we'd like to avoid the user having to re-validate their email again for example.
Giving users access to their Instant DB dashboards
We naturally would like the user to have access to their Instant DB dashboards just as a normal Instant DB user. This is straightforward if they are using SSO since then that login can just be reused. But if the user is using GPT Engineer with email and password we will likely need to ask the user to add an Instant DB password when creating the user.

Proposal #2:
Enable claimable projects.
The UUID of claimable projects is secret. A person that knows the UUID can claim it. Once it is claimed it is editable by both the creator of the project and the person who claimed it.

Thanks for writing these up!
It sounds like the most important functionality is:

You should be able to spin up an app easily, and associate it with a user (i.e. an email address)
You should be able to programmatically give that user access to the app (either by transferring ownership, or by adding that user as a collaborator, or allowing apps to be "claimable")

Let me know if I'm understanding things correctly @vikeri @AntonOsika :)

Correct!
I think Viktor’s solution here is easiest to implement.
You would just need to store:

user record field: api secret it was created with (optional)
project record field: api secret it was created with (optional)

and verify api secret, on create project and edit project, if attempted by someone else than user
api secrets are given out after appropriate trust+contract is signed with third party

Let me know if I'm understanding things correctly

Yep!


specify non-dynamic true/false values for checkboxes

Some backends or APIs require true/false values from checkboxes to be provided in a certain way (e.g. "1" vs "0", or non-empty vs. empty string). It would be great if there were a way to specify the true and false values for a checkbox input. I see that there is a way to bind the value to a dynamic property, but I haven't found a way to set a non-dynamic value. Basically something like this:
 <input
  type="checkbox"
  v-model="toggle"
  v-true-value="1"
  v-false-value="0">

Thanks for your consideration.

You can just bind it to a literal as :true-value="1", it works as expected.

Okay, I was confused by 2 things: vue.js doesn't alter the values that get POSTed when the form is submitted, and the docs seem to indicate that this only works for binding to a data property name (not a literal value).
Is it okay if I attempt to modify the documentation to make it clearer that v-bind:true-value and v-bind:false-value works for both literals and property names? Also, I could mention that vue.js doesn't change what actually gets submitted (or serialized) with the form, but that an easy workaround is to add a hidden field before the checkbox like so:
<input type="hidden" name="my-checkbox" value="0">
<input type="checkbox" name="my-checkbox" value="1" v-bind:true-value="1" v-bind:false-value="0" v-model="the_data_property">

(I'm new to vue.js so I want to make sure I understand how it works properly before mucking around in your docs).
Thanks for the quick reply, and for the wonderful framework! I also have been listening to some of your recent podcast interviews and really appreciate that you are actually familiar with other frameworks and can speak to the tradeoffs of each one instead of the usual "mine is the bestest and everything else sucks" schtick that so many other people seem to exhibit.

this seems still an issue. Usually checkboxes dont send data when empty. Now serialized they send 0, so if we run for example a check that the checkbox is requred, it will pass as there is actually a value, even if 0
@jordanlev tbh I don't understand your workaround with the hidden input

@Jossnaz - are you seeing the "false value" being sent as part of the actual submitted form data from the browser, or do you mean it's in some json data you've serialized from the Vue component's data?
The workaround with the hidden input is for the opposite situation than you describe -- if you want the browser to send a "false value" in the form data when the checkbox is unchecked, then you can do that. (But you are not wanting the value to be sent, so you should not use that technique).


Add python dep to the webapp's Dockerfile.

node-gyp  is used by the contextify node.js module and has a dependency on python 2.7

Just to be sure, did you test this locally (deleted the docker image and node_modules and re-ran fig/compose/docker build)?

Yes. Just tested it again today. Without the Python dep I still get an error with node-gyp (when doing a docker-compose up to satrt the containers). As soon as I add Python as dependency, deleting node_modules, rebuilding and starting up the containers succeeds :-)

Cool! :ship:


Make the zkasm backend an externally loadable backend

This is a tracking bug for all things that we will need to submit https://github.com/near/wasmtime to upstream https://github.com/bytecodealliance/wasmtime.
The wasmtime guidelines can be found in https://docs.wasmtime.dev/stability-tiers.html
- [x] Add "zkasm" compile feature to Cargo

FWIW, our discussions with wasmtime folks upstream have concluded in the direction that we probably aren’t going to be upstreaming this work straight away. There were some concerns from upstream about zkasm not being a "real hardware"; instead they have suggested that we might want to go in the direction of building an externally loadable backend and that they are very open to changes in cranelift proper to support an usecase like this.

We discussed a related topic of reusing filetests infrastructure on the recent zkwasm dev meeting.
The conclusion was that supporting filetests for ZK ASM brings the following benefits:

Improve code coverage using wasmtime tests
Be able to use test infrastructure of wasmtime
WASM code does not cover all Cranelift instructions, so we don’t excercise them in our current WASM tests

The downsides are:

Additional non-trivial work to support and maintain this codepath
Would make it harder to move ZK ASM backend outside of wasmtime codebase without breaking this part

The ultimate decision was to not do this for now, as we already have a decent coverage with WASM Spec tests, and come back to this decision later when we need to support Cranelift instructions that are not tested through WASM codepath.


Leo Solution Engineer

At Home Challenge for the solution engineer position by Leo Liu

Leo Solution Engineer - resubmit


Category feature 2.4.0

All the code formatting issue are fixed in https://github.com/wso2/carbon-store/commit/0424453c4bc5e31408bc123636add41c604a4ef1


Use xz to compress rootfs

Sure, I'll do it.

Done.

But what is the reasoning? And also, will users need xz available for the build script?

xz should provide better compression ratio

xz support is also built into Docker itself; I compress the Debian rootfs
tarballs with it since it gives me smaller sizes (not as compelling an
argument for the tiny Alpine tarballs)

Here is a handful of informational references about xz:

https://www.kernel.org/doc/Documentation/xz.txt
https://en.wikipedia.org/wiki/Xz
https://unix.stackexchange.com/questions/108100/why-are-tar-archive-formats-switching-to-xz-compression-to-replace-bzip2-and-wha

(i don't advocate either way on this)


EF7 + VNext + K projets + mysql: "The type or namespace name 'ModelConfiguration' does not exist in the namespace 'System.Data.Entity'"

Hi,
I'm not quite sure where I should post my question. If it's not here, where?
Well, I'm trying to set-up the environment for EF7 + aspnetvnext + K projets + mysql on my OSX.
I followed this excellent article, and I've created the app using the Yeoman generator and I'm able to run successfully the following commands:

kvm update
kpm restore

But when I run
$ k ef

I got
Microsoft.Framework.Runtime.Roslyn.RoslynCompilationException: /Users/roalcantara/Documents/vnext/DAL/MyDbContext.cs(3,26): error CS0234: The type or namespace name 'ModelConfiguration' does not exist in the namespace 'System.Data.Entity' (are you missing an assembly reference?)
And if I run
k kestrel

I got
Missing method BuildServiceProvider in assembly /Users/roalcantara/.kpm/packages/Microsoft.AspNet.Hosting/1.0.0-beta1/lib/aspnet50/Microsoft.AspNet.Hosting.dll, type Microsoft.Framework.DependencyInjection.Fallback.ServiceCollectionExtensions System.TypeLoadException: Could not load type 'Microsoft.Framework.DependencyInjection.Fallback.ServiceCollectionExtensions' from assembly 'Microsoft.AspNet.Hosting'. at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0
Am I missing any dependency?
Here is my /vnext/projects.json:
{
    "webroot" : "wwwroot",
    "exclude": "wwwroot/**/*.*",
    "dependencies": {
        "Microsoft.AspNet.Server.IIS":"1.0.0-beta1",
        "Microsoft.AspNet.Mvc": "6.0.0-beta1",
        "Microsoft.AspNet.Hosting": "1.0.0-beta1",
        "Microsoft.AspNet.Security.Cookies": "1.0.0-beta1",
        "Microsoft.AspNet.Server.WebListener": "1.0.0-beta1",
        "Microsoft.AspNet.StaticFiles": "1.0.0-beta1",
        "Kestrel": "1.0.0-beta1",
        "EntityFramework": "7.0.0-*",
        "EntityFramework.Migrations": "7.0.0-*",
        "EntityFramework.Commands": "7.0.0-*",
        "System.Data.Entity.Repository": "<IP_ADDRESS>",
        "MySql.Data.Entity.EF6": "6.8.3"
    },
    "commands": {
        "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5001",
        "kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5004",
        "ef": "EntityFramework.Commands"
    },
    "frameworks": {
        "aspnet50" : { }
    }
}

/vnext/Model/User.cs
using System.ComponentModel.DataAnnotations;

namespace VNext.Models
{
  public class User
  {
    [Key]
    public long id { get; set; }

    [Required]
    [MinLength(4)]
    public string Name { get; set; }

    [Required]
    [MinLength(6)]
    public string Username { get; set; }

    [Required]
    [MinLength(6)]
    public string Password { get; set; }
  }
}

/vnext/DAL/MyDbContext.cs
using VNext.Models;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;

namespace VNext.DAL
{
  public class MyDbContext : DbContext
  {
    public MyDbContext() : base("VNextConnectionString")
    {
      Database.SetInitializer<MyDbContext>(new MyDbInitializer());
    }

    public DbSet<User> Users { get; set; }

    protected override void OnModelCreating(DbModelBuilder modelBuilder)
    {
      modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
    }
  }
}

and my /vnext/Web.config
<connectionStrings>
  <add name="VNextConnectionString" providerName="MySql.Data.MySqlClient" connectionString="server=localhost;UserId=vnext;Password=vnext..;database=vnext_development;CharSet=utf8;Persist Security Info=True"/>
</connectionStrings>

This is my kvm list output:

Active
Version
Runtime
Location
Alias

*
1.0.0-beta1
Mono
~/.kre/packages
default

and my nuget sources are:

https://www.nuget.org/api/v2/
https://www.myget.org/F/aspnetvnext/api/v2/

Any ideas?
This is my all source code: https://github.com/roalcantara/vnext
Cheers.

Hi @rowanmiller and @Praburaj thank you so much for your reply.
I was definitely using the wrong code sample. Fallowing the MusicStore source and the Configuring-a-DbContext Wiki did the trick.
Now, when I run
$ k ef

I see the unicorn! :)
However, when I run
$ k ef migration Add AddUser

I'm getting:
System.InvalidOperationException: No service for type 'Microsoft.Data.Entity.Infrastructure.DbContextService1[Microsoft.Data.Entity.Migrations.Infrastructure.Migrator]' has been registered.   at Microsoft.Framework.DependencyInjection.ServiceProviderExtensions.GetRequiredService (IServiceProvider provider, System.Type serviceType) [0x00000] in <filename unknown>:0    at Microsoft.Framework.DependencyInjection.ServiceProviderExtensions.GetRequiredService[DbContextService1] (IServiceProvider provider) [0x00000] in :0
at Microsoft.Data.Entity.Commands.MigrationTool.CreateMigrator (Microsoft.Data.Entity.DbContext context) [0x00000] in :0
at Microsoft.Data.Entity.Commands.MigrationTool.CreateScaffolder (Microsoft.Data.Entity.DbContext context) [0x00000] in :0
at Microsoft.Data.Entity.Commands.MigrationTool.AddMigration (System.String migrationName, System.String contextTypeName, System.String rootNamespace, System.String projectDir) [0x00000] in :0
at Microsoft.Data.Entity.Commands.Program.AddMigration (System.String name, System.String context) [0x00000] in :0
at Microsoft.Data.Entity.Commands.Program+<>c__DisplayClass4.b__17 () [0x00000] in :0
at Microsoft.Framework.Runtime.Common.CommandLine.CommandLineApplication.Execute (System.String[] args) [0x00000] in :0
at Microsoft.Data.Entity.Commands.Program.Main (System.String[] args) [0x00000] in :0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0
I might have missed some configuration.
This is the /vnext/config.json
{
  "Data": {
    "DefaultConnection": {
        "ConnectionString":"server=localhost;UserId=vnext;Password=vnext..;database=vnext_development;CharSet=utf8;Persist Security Info=True",
        "ProviderName":"MySql.Data.MySqlClient"
    }
  },
  "EntityFramework": {
    "MyDbContext": {
        "ConnectionStringKey": "Data:DefaultConnection:ConnectionString"
    }
  }
}

the /vnext/Models/VNextContext.cs
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.Data.Entity;
using Microsoft.Data.Entity.Metadata;

namespace VNext.Models
{
  public class VNextContext : DbContext
  {
    public DbSet<User> Users { get; set; }

    protected override void OnModelCreating(ModelBuilder builder)
    {
      builder.Entity<User>().Key(a => a.Id);
      base.OnModelCreating(builder);
    }
  }
}

and the /vnet/Startup.cs
using System;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Diagnostics;
using Microsoft.AspNet.Diagnostics.Entity;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Routing;
using Microsoft.Data.Entity;
using Microsoft.Framework.Cache.Memory;
using Microsoft.Framework.ConfigurationModel;
using Microsoft.Framework.DependencyInjection;
using VNext.Models;

namespace KWebStartup
{
  public class Startup
  {
    public Startup()
    {
      Configuration = new Configuration()
                  .AddJsonFile("config.json")
                  .AddEnvironmentVariables(); //All environment variables in the process's context flow in as configuration values.
    }

    public IConfiguration Configuration { get; private set; }

    // This method gets called by the runtime.
    public void ConfigureServices(IServiceCollection services)
    {
        // Add EF services to the services container.
        services.AddEntityFramework(Configuration)
                .AddDbContext<VNextContext>();

        // Add MVC services to the services container.
        services.AddMvc();
    }

    //This method is invoked when ASPNET_ENV is 'Development' or is not defined
    //The allowed values are Development,Staging and Production
    public void ConfigureDevelopment(IApplicationBuilder app)
    {
      //Display custom error page in production when error occurs
      //During development use the ErrorPage middleware to display error information in the browser
      app.UseErrorPage(ErrorPageOptions.ShowAll);
      app.UseDatabaseErrorPage(DatabaseErrorPageOptions.ShowAll);

      // Add the runtime information page that can be used by developers
      // to see what packages are used by the application
      // default path is: /runtimeinfo
      app.UseRuntimeInfoPage();

      Configure(app);
    }

    // Configure is called after ConfigureServices is called.
    public void Configure(IApplicationBuilder app)
    {
      app.UseStaticFiles();

      // Add MVC to the request pipeline
      app.UseMvc(routes =>
      {
        routes.MapRoute(
            name: "default",
            template: "{controller}/{action}/{id?}",
            defaults: new { controller = "Home", action = "Index" });

        routes.MapRoute(
            name: "api",
            template: "{controller}/{id?}");
      });
    }
  }
}

Any ideas?
By the way, do you happen to know if is there any sample of EF7 + MySQL? I couldn't find any on google.
Thanks a lot.
And happy new year!

Hi @rowanmiller and @Praburaj thank you so much for your reply.
I was definitely using the wrong code sample. Fallowing the MusicStore source and the Configuring-a-DbContext Wiki did the trick.
Now, when I run
$ k ef

I see the unicorn! :)
However, when I run
$ k ef migration Add AddUser

I'm getting:
System.InvalidOperationException: No service for type 'Microsoft.Data.Entity.Infrastructure.DbContextService1[Microsoft.Data.Entity.Migrations.Infrastructure.Migrator]' has been registered.   at Microsoft.Framework.DependencyInjection.ServiceProviderExtensions.GetRequiredService (IServiceProvider provider, System.Type serviceType) [0x00000] in <filename unknown>:0    at Microsoft.Framework.DependencyInjection.ServiceProviderExtensions.GetRequiredService[DbContextService1] (IServiceProvider provider) [0x00000] in :0
at Microsoft.Data.Entity.Commands.MigrationTool.CreateMigrator (Microsoft.Data.Entity.DbContext context) [0x00000] in :0
at Microsoft.Data.Entity.Commands.MigrationTool.CreateScaffolder (Microsoft.Data.Entity.DbContext context) [0x00000] in :0
at Microsoft.Data.Entity.Commands.MigrationTool.AddMigration (System.String migrationName, System.String contextTypeName, System.String rootNamespace, System.String projectDir) [0x00000] in :0
at Microsoft.Data.Entity.Commands.Program.AddMigration (System.String name, System.String context) [0x00000] in :0
at Microsoft.Data.Entity.Commands.Program+<>c__DisplayClass4.b__17 () [0x00000] in :0
at Microsoft.Framework.Runtime.Common.CommandLine.CommandLineApplication.Execute (System.String[] args) [0x00000] in :0
at Microsoft.Data.Entity.Commands.Program.Main (System.String[] args) [0x00000] in :0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0
I might have missed some configuration.
This is the /vnext/config.json
{
  "Data": {
    "DefaultConnection": {
        "ConnectionString":"server=localhost;UserId=vnext;Password=vnext..;database=vnext_development;CharSet=utf8;Persist Security Info=True",
        "ProviderName":"MySql.Data.MySqlClient"
    }
  },
  "EntityFramework": {
    "MyDbContext": {
        "ConnectionStringKey": "Data:DefaultConnection:ConnectionString"
    }
  }
}

the /vnext/Models/VNextContext.cs
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.Data.Entity;
using Microsoft.Data.Entity.Metadata;

namespace VNext.Models
{
  public class VNextContext : DbContext
  {
    public DbSet<User> Users { get; set; }

    protected override void OnModelCreating(ModelBuilder builder)
    {
      builder.Entity<User>().Key(a => a.Id);
      base.OnModelCreating(builder);
    }
  }
}

and the /vnet/Startup.cs
using System;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Diagnostics;
using Microsoft.AspNet.Diagnostics.Entity;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Routing;
using Microsoft.Data.Entity;
using Microsoft.Framework.Cache.Memory;
using Microsoft.Framework.ConfigurationModel;
using Microsoft.Framework.DependencyInjection;
using VNext.Models;

namespace KWebStartup
{
  public class Startup
  {
    public Startup()
    {
      Configuration = new Configuration()
                  .AddJsonFile("config.json")
                  .AddEnvironmentVariables(); //All environment variables in the process's context flow in as configuration values.
    }

    public IConfiguration Configuration { get; private set; }

    // This method gets called by the runtime.
    public void ConfigureServices(IServiceCollection services)
    {
        // Add EF services to the services container.
        services.AddEntityFramework(Configuration)
                .AddDbContext<VNextContext>();

        // Add MVC services to the services container.
        services.AddMvc();
    }

    //This method is invoked when ASPNET_ENV is 'Development' or is not defined
    //The allowed values are Development,Staging and Production
    public void ConfigureDevelopment(IApplicationBuilder app)
    {
      //Display custom error page in production when error occurs
      //During development use the ErrorPage middleware to display error information in the browser
      app.UseErrorPage(ErrorPageOptions.ShowAll);
      app.UseDatabaseErrorPage(DatabaseErrorPageOptions.ShowAll);

      // Add the runtime information page that can be used by developers
      // to see what packages are used by the application
      // default path is: /runtimeinfo
      app.UseRuntimeInfoPage();

      Configure(app);
    }

    // Configure is called after ConfigureServices is called.
    public void Configure(IApplicationBuilder app)
    {
      app.UseStaticFiles();

      // Add MVC to the request pipeline
      app.UseMvc(routes =>
      {
        routes.MapRoute(
            name: "default",
            template: "{controller}/{action}/{id?}",
            defaults: new { controller = "Home", action = "Index" });

        routes.MapRoute(
            name: "api",
            template: "{controller}/{id?}");
      });
    }
  }
}

Any ideas?
By the way, do you happen to know if is there any sample of EF7 + MySQL? I couldn't find any on google.
Thanks a lot.
And happy new year!

Hey,
You need to also register the SQL Server services in Startup.cs:
        // Add EF services to the services container.
        services.AddEntityFramework(Configuration)
                .AddSqlServer()
                .AddDbContext<VNextContext>();

And you need to tell EF to use SQL Server for that particular context. You can do that in your context:
        protected override void OnConfiguring(DbContextOptions builder)
        {
            builder.UseSqlServer();
        }

Or in Startup.cs:

    services.AddEntityFramework(Configuration)
            .AddSqlServer()
            .AddDbContext<VNextContext>(options => options.UseSqlServer());

In the future you will be able to specify the provider in config.json too... but not just yet.

~Rowan

Hi @rowanmiller,
Thank you so much for your help.
I had taken off that lines cuz I wanted to use MySQL instead of SQL Server and I thought that lines were only for SQL Server. Sorry about that.
Anyway, I've updated my Startup.cs as suggested, have a look:
using System;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Diagnostics;
using Microsoft.AspNet.Diagnostics.Entity;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Routing;
using Microsoft.Data.Entity;
using Microsoft.Framework.Cache.Memory;
using Microsoft.Framework.ConfigurationModel;
using Microsoft.Framework.DependencyInjection;
using VNext.Models;

namespace KWebStartup
{
  public class Startup
  {
    public Startup()
    {
      Configuration = new Configuration()
                  .AddJsonFile("config.json")
                  .AddEnvironmentVariables(); //All environment variables in the process's context flow in as configuration values.
    }

    public IConfiguration Configuration { get; private set; }

    // This method gets called by the runtime.
    public void ConfigureServices(IServiceCollection services)
    {
        // Add EF services to the services container.
        services.AddEntityFramework(Configuration)
                .AddSqlServer() //register the SQL Server services
                .AddDbContext<VNextContext>(options => options.UseSqlServer()); //telling EF to use SQL Server for that particular context

        // Add MVC services to the services container.
        services.AddMvc();
    }

    //This method is invoked when ASPNET_ENV is 'Development' or is not defined
    //The allowed values are Development,Staging and Production
    public void ConfigureDevelopment(IApplicationBuilder app)
    {
      //Display custom error page in production when error occurs
      //During development use the ErrorPage middleware to display error information in the browser
      app.UseErrorPage(ErrorPageOptions.ShowAll);
      app.UseDatabaseErrorPage(DatabaseErrorPageOptions.ShowAll);

      // Add the runtime information page that can be used by developers
      // to see what packages are used by the application
      // default path is: /runtimeinfo
      app.UseRuntimeInfoPage();

      Configure(app);
    }

    // Configure is called after ConfigureServices is called.
    public void Configure(IApplicationBuilder app)
    {
      app.UseStaticFiles();

      // Add MVC to the request pipeline
      app.UseMvc(routes =>
      {
        routes.MapRoute(
            name: "default",
            template: "{controller}/{action}/{id?}",
            defaults: new { controller = "Home", action = "Index" });

        routes.MapRoute(
            name: "api",
            template: "{controller}/{id?}");
      });
    }
  }
}

However, when I run:
$ k ef migration add AddUser

I'm still getting:
System.InvalidOperationException: No service for type 'Microsoft.Data.Entity.Infrastructure.DbContextService1[Microsoft.Data.Entity.Migrations.Infrastructure.Migrator]' has been registered.   at Microsoft.Framework.DependencyInjection.ServiceProviderExtensions.GetRequiredService (IServiceProvider provider, System.Type serviceType) [0x00000] in <filename unknown>:0    at Microsoft.Framework.DependencyInjection.ServiceProviderExtensions.GetRequiredService[DbContextService1] (IServiceProvider provider) [0x00000] in :0
at Microsoft.Data.Entity.Commands.MigrationTool.CreateMigrator (Microsoft.Data.Entity.DbContext context) [0x00000] in :0
at Microsoft.Data.Entity.Commands.MigrationTool.CreateScaffolder (Microsoft.Data.Entity.DbContext context) [0x00000] in :0
at Microsoft.Data.Entity.Commands.MigrationTool.AddMigration (System.String migrationName, System.String contextTypeName, System.String rootNamespace, System.String projectDir) [0x00000] in :0
at Microsoft.Data.Entity.Commands.Program.AddMigration (System.String name, System.String context) [0x00000] in :0
at Microsoft.Data.Entity.Commands.Program+<>c__DisplayClass4.b__17 () [0x00000] in :0
at Microsoft.Framework.Runtime.Common.CommandLine.CommandLineApplication.Execute (System.String[] args) [0x00000] in :0
at Microsoft.Data.Entity.Commands.Program.Main (System.String[] args) [0x00000] in :0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0
I'm really thinking I might be missing some configuration..
Any thoughts?

Hi folks,
Can we use MySQL on asp.net vnext?
If not, how do you usually develop asp.net vnext applications on OSX?
Thanks a lot.

@roalcantara - Any chance you could share the actual code files so we could debug locally and see what is going wrong? I can't see anything obviously wrong with the code you have posted.
There is no MySQL provider for EF7 just yet. Our team is working to sure up our SQL Server provider, then we'll look at PostgreSQL and get back to finishing other providers we started (SQLite, Azure Table Storage, Redis).

Hi @rowanmiller, thanks again for your reply.
Yeah, sure. This is the source code: https://github.com/roalcantara/vnext
So, if there is no MySQL provider for EF7 yet, how do you develop asp.net vnext on OSX?
What would you suggest? Can I install SQLServer on OSX? Or, perhaps, having a Windows on dual-boot would be the way to go for now?
Cheers mate.

@roalcantara,
As I understand it, EF7 is in the early stages of development, and a MySQL provider is not yet available.
It seems the current options are: SqlServer, SQLite, AzureTableStorage, and InMemory (according to this page).
@rowanmiller,
Are there any issues (either here or on the MySQL website) that we can watch for progress in this regard?

@roalcantara what @glen-84 @ says is correct. It might also help to look at this blog post on priorities, and focus for the Initial release of EF7 to understand where we are.
We want to have a good story for server development targeting OSX and Linux and we are planning to work towards that after the initial release, but at this point we haven't really picked a provider that we would build. PostgreSQL and MySQL are the main contenders (although SQLite could be OK for small applications and we would like to have a story for connecting to SQL Server on a Windows box at some point).
Feedback and any knowledge of potential contributions from the community should help us make the best choice.

@divega Would the MySQL provider not be written by MySQL, like the one for EF6? (link)
If it will be written by the EF team, then I would say that MySQL > SQLite or PostgreSQL.

@glen-84 I read this as you saying that all things being equal, you would find MySQL the most useful. Is that correct?
Writing the provider isn't a goal for us on its own, but it would be a means to accelerate getting something out there that works well with EF7.
Incidentally, we have been working on a SQLite provider, mostly because it is the de facto option local data access.

@divega, apologies for not being clear. What I meant was that MySQL tends to have a greater following and a larger community than PostgreSQL, which means that implementing it would satisfy more developers.
I would position SQLite separately to the above two, because it has a different usage profile (local data access, smaller databases, etc.), and may be important for things like mobile application development.

@glen-84 Agreed that SQLite is on a different category. Thanks for your feedback. We'll keep it in mind.

@divega, @glen-84, @rowanmiller thanks for the replies.
Well, I've decided use the Azure as datasource. Then, I don't need to have any database locally, and I can develop tranquilly on my OSX.
My customer, however, requested me to use EF6 instead of EF7, once he reckons that the EF7 is still in their initial stage of development at the moment and is not recommended for production.
What would you say about this? Do you guys agree? If so, can I develop vNext normally using EF6 on my OSX?
Cheers.

@roalcantara - Both EF7 and ASP.NET vNext aren't ready for production use (they are both on the same timeline to an initial release). That said, EF7 is probably still seeing a higher rate of major API changes etc. as it was more of a re-write than most areas of ASP.NET vNext.
EF6 should work on Mono (but it's not a scenario that our team has historically verified for EF6 and earlier releases). You wouldn't be able to target the .NET Core though, it would need to be full .NET. You also loose integration with dependency injection etc.

@roalcantara There has been a lot of discussion on this thread. I just wanted to see if you had outstanding issues still or if we can close this one now?

Closing but please reopen if further discussion is needed


fix(language-server): pass correct languageId when creating virtual code

When virtual code was created, the URI was passed as the language ID. Within MDX this means sometimes no virtual code was created at all, breaking semantic diagnostics and syntax toggles. The effects may be different for other implementations.

Thanks!


define distributed as a type

What does this PR do?
prevent typos in selecting distributed types...
in next one we can simplify all self.use_ddp,  self.use_ddp_spawn, etc. as they are equal
Note that this is just internal mapping, nothing changes for the end user
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃

@rohitgr7 great, thx for checking... 🐰

How about doing the same for amp_backend and amp_level too??

amp_backend

we already have amp_backend :]
https://github.com/PyTorchLightning/pytorch-lightning/blob/d5254ff9dfb67fba388de224a320f3a562561a80/pytorch_lightning/utilities/__init__.py#L25-L27


Add deprecation notice for the pkg directory

As per consensus expressed on the dev summit:
https://docs.google.com/document/d/11LC3wJcVk00l8w5P3oLQ-m3Y37iom6INAMEu2ZAGIIE/edit?pli=1#heading=h.80qrixk0sjgv
Note: Once this is approved and merged, I'll add the same to other pkg directories throughout the GH org.

The only new convention is to not use pkg, and that's already in the notice.
Are you expecting something else?

I noticed that I merged this. Hope it's not an issue.

I think it's good to have merged this so we have the deprecation note in place (as discussed in the dev-summit).
Once we have #9478 merged, we can consider deleting the note again (or leaving it in so that nobody is tempted to create a package within the pkg directory again).


Hyphens are disallowed by GraphQL spec

When a field name has a hyphen, it breaks the app since it is disallowed by GraphQL spec.
Example: https://datopian.github.io/data-explorer-graphql/?path=/story/templates--power-system-right-now
Tasks

[ ] Analysis of implementing resolver to fix this (can be done either in server level or here in the client level)

Analysis
Resolver enables us to resolve a value of a type or a field in a schema. A simple example can be like this:
const typeDefs = gql`
  type User {
       id
       username
   }
`

const resolver = {
    User: {
      username: (parent, args, context, info) =>{
            //perform custom operation
            return "myname" // this will always return "myname" no matter the query
      }
  }
}

For every field to be resolve we create a resolver function (like the one created for username above) that takes in parent (if a type is reference in another type. I will show an example below), args: (for argument passed in like transmisonlines({order_by:{}}), order_by is an arg), context: (graphql and app context to be share among all resolvers) and info: (contains resolver properties).
Resolver to fix the Graphql spec would be possible if the graphql query is created like this from the server side:
const typeDefs = gql`
  type powersystemrightnow {
    Minutes1UTC : datetime
    Minutes1DK : datetime
    CO2Emission: number
    ProductionGe100MW: number
    ProductionLt100MW: number
    SolarPower: number: number
    OffshoreWindPower: number
    OnshoreWindPower: number
    Exchange_DK1-DK2: number
    extrafield: extrafield
   }

 type extrafield {
    extrafield: number
  }
`
const resolver = {
  extrafield: (parent, args, context, info) => {
     // since extrafield is a child node to powersystemright now
    // it has access to all of it fields and their values
   return parent["Exchange_DK1-DK2"]
 }
}

This method above is okay but might involve some changes in the frontend since we are automatically generating graphql query from the schema and input fields using graphql-query-builder
NOTE if the above type is created manually containing field like Exchange_DK1-DK2 it will show error on the server side also.
Proposed solution
Since this a spec error base on the field name convention, I assume the field is generated from hasura converting postgress  table to graphql. if so, we can customize the field name (e.g Exchange_DK1-DK2) to something else.
This hasura blog shows how to do that: https://hasura.io/blog/customising-alias-graphql-fields-with-hasura/#:~:text=Server-,Side,-Customisation with Hasura

@steveoni thanks for analysis. I've implemented fix here: https://github.com/datopian/data-explorer-graphql/commit/9f6319ab72b141240c3770b09eb6ef8cf59cccd7
I also did some update in Hasura server so now it works:
https://datopian.github.io/data-explorer-graphql/?path=/story/templates--power-system-right-now

Closing this as FIXED.
Note that you need to handle hyphens in Hasura server as well as described in the analysis of this issue.


Modifier -> SwiftUI -> Clipboard: onCutCommand(perform:)

Doc: https://developer.apple.com/documentation/swiftui/view/oncutcommand(perform:)

[ ] Swift implementation
[ ] Elixir implementation

According to the @supernintendo @carson-katri @shadowfacts we won't support this


Creative Mode Crash When Searching

Creative Mode crash when trying to search
In a creative world, press 'e' to open inventory.  Click on the search button and get this crash for Index out of bound error.  I can use JEI search window without crashing.  I removed Blood Magic and was able to use the search button.  Loaded version 72 of Blood Magic.  Same crash, except not 16, but 32767 for the index out of bound error.  Created a pack with just Blood Magic and all worked fine.  Added RFTools and RFTools Dimensions and get the crash.  Not sure if RFTools or Blood Magic is causing the crash.  Have created the issue on both sites.

In creative world and creative mode, open inventory
Click on Minecraft creative tab search button

...

Affected Versions (Do not use "latest"):

BloodMagic: 1.11-2.1.4-73
Minecraft: 1.11.2
Forge: 2252
rftoolsdim: 1.1x-4.54
crash-2017-02-25_16.50.48-client.txt

I will add protection to rftools dimensions to not crash but it does appear to be a bug in Blood Magic though. @WayOfTime can you have a look at this?

This was already fixed here: https://github.com/WayofTime/BloodMagic/issues/1057

Aha thanks


Cannot install

Hi! Totally new to go and I cannot install this.
Error i'm getting is
can't load package: /Users/igor/gocode/src/github.com/calavera/docker-volume-keywhiz/driver.go:14:2: import "github.com/square/keywhiz-fs" is a program, not an importable package
Can you help?
Thanks 👍

It looks like they changed the whole package structure causing this to stop compiling:
https://github.com/square/keywhiz-fs/commit/4d18b0e5fed5e285f72cdd182f182f056f9b2d89
Probably, the easier solution is to vendor the latest good SHA that makes it compile, I'd start trying with the previous one to that change:
https://github.com/square/keywhiz-fs/tree/0369d465dac53848e6b76b1cc4d61c631cf9e7d0

I'll try it out!
Thanks


master to main for texture

https://github.com/chrisrzhou/react-globe/issues/31
The master branch is now main the texture weren't loading since the change.
I changed the references for master to main

Thanks @DelahayesTheo, accepting this as a temporary hotfix.  I am formally addressing this in v5.0.0 where the library will no longer include the default image assets and you would need to provide a URL or dataURL.


"+" is not enough visible

Hello,
the New snippet/New folder button is probably not enough visible for the first usage.

Hi,
100% true. I'm trying to find a new way to have this "+" button.

Next version is fixing this issue.

Should be fixed with v1.6.0


Update cli to use 4.0 of azure-batch SDK

This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines

[x] The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

Command Guidelines

[x] Each command and parameter has a meaningful description.
[x] Each new command has a test.

(see Authoring Command Modules)

@annatisch @xingwu1

@troydai - Looks like Anna has signed off now. Can we merge?
Thanks!


ArityException with cookbook sample 4

[x] I have read through the quick start and installation sections of the README.

Info

Info
Value

Operating System
macOS Big Sur 11.2.1

Geni Version
0.0.38

Spark Java lib Version
org.apache.spark/spark-XXX_2.12 "3.1.0"

JDK
openjdk version "1.8.0_282"

Spark Version
3.0.2

Problem / Steps to reproduce
Standard lein new geni …, bitnami/spark 3.0.2 docker,  then used code from geni cookbook chapter 4.
The following code from cookbook example 4 fails with ArityException:
(def null-counts
    (-> raw-weather-mar-2012
        (g/agg (->> (g/column-names raw-weather-mar-2012)
                    (map #(vector % (g/null-count %)))
                    (into {})))
        (g/first)))

Exception is
Execution error (AnalysisException) at org.apache.spark.sql.catalyst.analysis.package$AnalysisErrorAt/failAnalysis (package.scala:42).
cannot resolve '`Precip. Amount (mm)`' given input columns: [Climate ID, Date/Time (LST), Day, Dew Point Temp (°C), Dew Point Temp Flag, Hmdx, Hmdx Flag, Latitude (y), Longitude (x), Month, Precip. Amount (mm), Precip. Amount Flag, Rel Hum (%), Rel Hum Flag, Station Name, Stn Press (kPa), Stn Press Flag, Temp (°C), Temp Flag, Time (LST), Visibility (km), Visibility Flag, Weather, Wind Chill, Wind Chill Flag, Wind Dir (10s deg), Wind Dir Flag, Wind Spd (km/h), Wind Spd Flag, Year];
'Aggregate [sum(cast(cast(isnull(Latitude (y)#13272) as int) as bigint)) AS Latitude (y)#16363L, sum(cast(cast(isnull(Stn Press Flag#13295) as int) as bigint)) AS Stn Press Flag#16364L, sum(cast(cast(isnull(Temp (°C)#13280) as int) as bigint)) AS Temp (°C)#16365L, sum(cast(cast(isnull(Wind Spd (km/h)#13290) as int) as bigint)) AS Wind Spd (km/h)#16366L, sum(cast(cast(isnull(Rel Hum Flag#13285) as int) as bigint)) AS Rel Hum Flag#16367L, sum(cast(cast(isnull(Date/Time (LST)#13275) as int) as bigint)) AS Date/Time (LST)#16368L, sum(cast(cast(isnull(Visibility Flag#13293) as int) as bigint)) AS Visibility Flag#16369L, sum(cast(cast(isnull(Visibility (km)#13292) as int) as bigint)) AS Visibility (km)#16370L, sum(cast(isnull('Precip. Amount (mm)) as int)) AS Precip. Amount (mm)#16371, sum(cast(cast(isnull(Dew Point Temp Flag#13283) as int) as bigint)) AS Dew Point Temp Flag#16372L, sum(cast(isnull('Precip. Amount Flag) as int)) AS Precip. Amount Flag#16373, sum(cast(cast(isnull(Station Name#13273) as int) as bigint)) AS Station Name#16374L, sum(cast(cast(isnull(Wind Chill Flag#13299) as int) as bigint)) AS Wind Chill Flag#16375L, sum(cast(cast(isnull(Longitude (x)#13271) as int) as bigint)) AS Longitude (x)#16376L, sum(cast(cast(isnull(Time (LST)#13279) as int) as bigint)) AS Time (LST)#16377L, sum(cast(cast(isnull(Dew Point Temp (°C)#13282) as int) as bigint)) AS Dew Point Temp (°C)#16378L, sum(cast(cast(isnull(Rel Hum (%)#13284) as int) as bigint)) AS Rel Hum (%)#16379L, sum(cast(cast(isnull(Wind Dir Flag#13289) as int) as bigint)) AS Wind Dir Flag#16380L, sum(cast(cast(isnull(Climate ID#13274) as int) as bigint)) AS Climate ID#16381L, sum(cast(cast(isnull(Wind Dir (10s deg)#13288) as int) as bigint)) AS Wind Dir (10s deg)#16382L, sum(cast(cast(isnull(Stn Press (kPa)#13294) as int) as bigint)) AS Stn Press (kPa)#16383L, sum(cast(cast(isnull(Year#13276) as int) as bigint)) AS Year#16384L, sum(cast(cast(isnull(Temp Flag#13281) as int) as bigint)) AS Temp Flag#16385L, sum(cast(cast(isnull(Hmdx#13296) as int) as bigint)) AS Hmdx#16386L, ... 6 more fields]
+- Project [Longitude (x)#13211 AS Longitude (x)#13271, Latitude (y)#13212 AS Latitude (y)#13272, Station Name#13213 AS Station Name#13273, Climate ID#13214 AS Climate ID#13274, Date/Time (LST)#13215 AS Date/Time (LST)#13275, Year#13216 AS Year#13276, Month#13217 AS Month#13277, Day#13218 AS Day#13278, Time (LST)#13219 AS Time (LST)#13279, Temp (°C)#13220 AS Temp (°C)#13280, Temp Flag#13221 AS Temp Flag#13281, Dew Point Temp (°C)#13222 AS Dew Point Temp (°C)#13282, Dew Point Temp Flag#13223 AS Dew Point Temp Flag#13283, Rel Hum (%)#13224 AS Rel Hum (%)#13284, Rel Hum Flag#13225 AS Rel Hum Flag#13285, Precip. Amount (mm)#13226 AS Precip. Amount (mm)#13286, Precip. Amount Flag#13227 AS Precip. Amount Flag#13287, Wind Dir (10s deg)#13228 AS Wind Dir (10s deg)#13288, Wind Dir Flag#13229 AS Wind Dir Flag#13289, Wind Spd (km/h)#13230 AS Wind Spd (km/h)#13290, Wind Spd Flag#13231 AS Wind Spd Flag#13291, Visibility (km)#13232 AS Visibility (km)#13292, Visibility Flag#13233 AS Visibility Flag#13293, Stn Press (kPa)#13234 AS Stn Press (kPa)#13294, ... 6 more fields]
   +- Relation[Longitude (x)#13211,Latitude (y)#13212,Station Name#13213,Climate ID#13214,Date/Time (LST)#13215,Year#13216,Month#13217,Day#13218,Time (LST)#13219,Temp (°C)#13220,Temp Flag#13221,Dew Point Temp (°C)#13222,Dew Point Temp Flag#13223,Rel Hum (%)#13224,Rel Hum Flag#13225,Precip. Amount (mm)#13226,Precip. Amount Flag#13227,Wind Dir (10s deg)#13228,Wind Dir Flag#13229,Wind Spd (km/h)#13230,Wind Spd Flag#13231,Visibility (km)#13232,Visibility Flag#13233,Stn Press (kPa)#13234,... 6 more fields] csv

Also manual select with column named "Precip. Amount (mm)" does not work. It seems that they have backticks around them internally.
I tried to rename all columns with
(g/to-df weather-data
               "Longitude (x)" "Latitude (y)" "Station Name" "Climate ID" "Date/Time (LST)" "Year" "Month" "Day"
               "Time (LST)" "Temp (°C)" "Temp Flag" "Dew Point Temp (°C)" "Dew Point Temp Flag" "Rel Hum (%)"
               "Rel Hum Flag" "Precip. Amount (mm)" "Precip. Amount Flag" "Wind Dir (10s deg)" "Wind Dir Flag"
               "Wind Spd (km/h)" "Wind Spd Flag" "Visibility (km)" "Visibility Flag" "Stn Press (kPa)" "Stn Press Flag"
               "Hmdx" "Hmdx Flag" "Wind Chill" "Wind Chill Flag" "Weather"))

but the problem persists, still backticks.
Crashes: (g/select raw-weather-mar-2012 "Precip. Amount (mm)")
Works:    (g/select raw-weather-mar-2012 "`Precip. Amount (mm)`")
(g/column-names (g/select raw-weather-mar-2012 "`Precip. Amount (mm)`"))
yields "Precip. Amount (mm)" without backticks.
This lead me to believe that there is some issue in geni or spark with these column names.

Huh... That's very odd... Thank you for flagging this up! I've added this to my TODO list. I think I'll have time to look into it next week. I hope that's okay!

Hi Anthony,
thank you for your quick reply!  I figured that I got to this due to a small glitch in Cookbook Chapter 4, where it reads the initial csv without  {:kebab-columns true}.  Just adding that "fixed" it and also is consistent with the chapter sample output.  However, still interesting why it does not work without the kebap special char mangling, I believe it should.
Just started with spark and geni the other day, and I can already say it is one of the best APIs I used in years, congrats!
Such a lot of fun! I will for sure continue to use it. It also seems to be quite fast even on my local machine.
Hope you find the cause of this quickly, have a good day!
Ciao
...Jochen

Am 25.02.2021 um 23:10 schrieb Anthony Khong<EMAIL_ADDRESS>Huh... That's very odd... Thank you for flagging this up! I've added this to my TODO list. I think I'll have time to look into it next week. I hope that's okay!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/zero-one-group/geni/issues/315#issuecomment-786261238, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETGETQSM7C7BHKQARJFKPTTA3DEHANCNFSM4YEW56FQ.

Hi Jochen, thank you for the kind words!! Glad you’re enjoying it. Please let me know if you have any feature requests.
On this issue, I think this is related: https://mungingdata.com/pyspark/avoid-dots-periods-column-names/
Basically Spark doesn’t like column names with dots. One thing we can do is to auto-escape it, but I’m not sure if this is the best solution, because you lose the Spark correspondence. I’m leaning towards having a ‘safe-mode’ that is on by default in the read functions that basically scans the column names for dots, and replace it with underscores 🤔

Hi Anthony...
thank you for digging into this! Yes you are right I think, it looks like it is indeed the described issue.
My feeling is to just document this in the geni docs and recommend kebab-case in these cases. It fixes it very well in the Cookbook example :-).
Ciao
...Jochen

Am 26.02.2021 um 11:46 schrieb Anthony Khong<EMAIL_ADDRESS>Hi Jochen, thank you for the kind words!! Glad you’re enjoying it. Please let me know if you have any feature requests.
On this issue, I think this is related: https://mungingdata.com/pyspark/avoid-dots-periods-column-names/ https://mungingdata.com/pyspark/avoid-dots-periods-column-names/
Basically Spark doesn’t like column names with dots. One thing we can do is to auto-escape it, but I’m not sure if this is the best solution, because you lose the Spark correspondence. I’m leaning towards having a ‘safe-mode’ that is on by default in the read functions that basically scans the column names for dots, and replace it with underscores 🤔
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/zero-one-group/geni/issues/315#issuecomment-786568182, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETGETV3GMO2F4B3XXXZRHDTA53XLANCNFSM4YEW56FQ.

Hi Anthony...
just a quick followup on our recent discussion regarding the dot/backticks column name issue.
I read up a little about this in spark docs, in Spark SQL docs I found Spark to be really restrictive, allowing just letters (a-zA-Z), digits and underscore.
https://spark.apache.org/docs/latest/sql-ref-identifier.html https://spark.apache.org/docs/latest/sql-ref-identifier.html
So, your :kebab-columns is doing it perfect for clojure I think. An issue could be present for people exporting parquet files for use in other languages, that like underscores better.
Instead of :kebab-columns true one could use  something like :snake-columns true.
Using {:convert-column-names :kebab | :snake} might be a bit more elegant, but well, this would change the API :-).
I appended my repl code (reusing your data-sources code in case you would like to play with it?!
Have a good day Anthony!
Ciao
...Jochen
(require '[zero-one.geni.core.data-sources :as ds]
'[zero-one.geni.interop :as interop]
'camel-snake-kebab.core)
(defn ->normalized-columns
"Returns a new Dataset with all columns renamed using passed rename-fn."
[dataset rename-fn]
(let [remove-punctuations #'ds/remove-punctuations          ; access privates
deaccent #'ds/deaccent
new-columns (->> dataset
.columns
(map remove-punctuations)
(map deaccent)
(map rename-fn))]
(.toDF dataset (interop/->scala-seq new-columns))))
(comment
; plain
(-> (g/read-csv! (str "data/cookbook/weather/weather-2012-3.csv"))
(g/select "Precip. Amount (mm)"))
; kebap-columns
(-> (g/read-csv! (str "data/cookbook/weather/weather-2012-3.csv"))
(->normalized-columns camel-snake-kebab.core/->kebab-case)
(g/select "precip-amount-mm"))
; snake-columns
(-> (g/read-csv! (str "data/cookbook/weather/weather-2012-3.csv"))
(->normalized-columns camel-snake-kebab.core/->snake_case)
(g/select "precip_amount_mm"))
)

Am 26.02.2021 um 11:46 schrieb Anthony Khong<EMAIL_ADDRESS>Hi Jochen, thank you for the kind words!! Glad you’re enjoying it. Please let me know if you have any feature requests.
On this issue, I think this is related: https://mungingdata.com/pyspark/avoid-dots-periods-column-names/ https://mungingdata.com/pyspark/avoid-dots-periods-column-names/
Basically Spark doesn’t like column names with dots. One thing we can do is to auto-escape it, but I’m not sure if this is the best solution, because you lose the Spark correspondence. I’m leaning towards having a ‘safe-mode’ that is on by default in the read functions that basically scans the column names for dots, and replace it with underscores 🤔
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/zero-one-group/geni/issues/315#issuecomment-786568182, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETGETV3GMO2F4B3XXXZRHDTA53XLANCNFSM4YEW56FQ.