-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jetty update #3
Merged
devinrsmith
merged 7 commits into
deephaven-examples:main
from
devinrsmith:jetty-update
Nov 16, 2022
Merged
Jetty update #3
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
9d0c39e
Update to jetty
devinrsmith 8f24408
Rename files
devinrsmith 86079c4
Format python code with black
devinrsmith e9c2ffe
Add layout
devinrsmith 230512f
Remove non-working examples, layout
devinrsmith a2fb62e
feedback
devinrsmith 23b1f7b
explicit dependency
devinrsmith File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,183 @@ | ||
{ | ||
"layoutConfig": [ | ||
{ | ||
"type": "column", | ||
"isClosable": true, | ||
"isFocusOnShow": true, | ||
"reorderEnabled": true, | ||
"title": "", | ||
"content": [ | ||
{ | ||
"type": "row", | ||
"isClosable": true, | ||
"isFocusOnShow": true, | ||
"reorderEnabled": true, | ||
"title": "", | ||
"height": 54.54545454545454, | ||
"content": [ | ||
{ | ||
"type": "stack", | ||
"isClosable": true, | ||
"isFocusOnShow": true, | ||
"reorderEnabled": true, | ||
"title": "", | ||
"width": 47.37762237762238, | ||
"activeItemIndex": 0, | ||
"height": 100, | ||
"content": [ | ||
{ | ||
"type": "react-component", | ||
"component": "ConsolePanel", | ||
"title": "Console", | ||
"isClosable": false, | ||
"id": "erpozSH5iO", | ||
"props": { | ||
"metadata": {}, | ||
"panelState": { | ||
"consoleSettings": {}, | ||
"itemIds": [ | ||
[ | ||
"m_figure", | ||
"s12lxgm2M" | ||
], | ||
[ | ||
"figure", | ||
"Ek9z6L6Ch" | ||
] | ||
] | ||
} | ||
}, | ||
"componentName": "lm-react-component", | ||
"isFocusOnShow": true, | ||
"reorderEnabled": true, | ||
"componentState": null | ||
}, | ||
{ | ||
"type": "react-component", | ||
"component": "LogPanel", | ||
"title": "Log", | ||
"isClosable": false, | ||
"id": "DMV2y0zEMY", | ||
"props": { | ||
"metadata": {} | ||
}, | ||
"componentName": "lm-react-component", | ||
"isFocusOnShow": true, | ||
"reorderEnabled": true, | ||
"componentState": null | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "stack", | ||
"width": 52.62237762237763, | ||
"isClosable": true, | ||
"isFocusOnShow": true, | ||
"reorderEnabled": true, | ||
"title": "", | ||
"activeItemIndex": 1, | ||
"content": [ | ||
{ | ||
"type": "react-component", | ||
"component": "CommandHistoryPanel", | ||
"title": "Command History", | ||
"isClosable": false, | ||
"id": "i0ww9QktWa", | ||
"props": { | ||
"metadata": {}, | ||
"panelState": {} | ||
}, | ||
"componentName": "lm-react-component", | ||
"isFocusOnShow": true, | ||
"reorderEnabled": true, | ||
"componentState": null | ||
}, | ||
{ | ||
"type": "react-component", | ||
"component": "FileExplorerPanel", | ||
"title": "File Explorer", | ||
"isClosable": false, | ||
"id": "h7nN4VTULl", | ||
"props": { | ||
"metadata": {} | ||
}, | ||
"componentName": "lm-react-component", | ||
"isFocusOnShow": true, | ||
"reorderEnabled": true, | ||
"componentState": null | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "stack", | ||
"isClosable": true, | ||
"isFocusOnShow": true, | ||
"reorderEnabled": true, | ||
"title": "", | ||
"height": 45.45454545454545, | ||
"activeItemIndex": 0, | ||
"width": 100, | ||
"content": [ | ||
{ | ||
"type": "react-component", | ||
"component": "NotebookPanel", | ||
"isFocusOnShow": false, | ||
"props": { | ||
"metadata": { | ||
"id": "P1528kRW9" | ||
}, | ||
"panelState": { | ||
"settings": { | ||
"value": null, | ||
"language": "python" | ||
}, | ||
"fileMetadata": { | ||
"id": "/1_example.py", | ||
"itemName": "/1_example.py" | ||
}, | ||
"isPreview": true | ||
} | ||
}, | ||
"title": "1_example.py", | ||
"id": "P1528kRW9", | ||
"componentName": "lm-react-component", | ||
"isClosable": true, | ||
"reorderEnabled": true, | ||
"componentState": null | ||
}, | ||
{ | ||
"type": "react-component", | ||
"component": "NotebookPanel", | ||
"isFocusOnShow": false, | ||
"props": { | ||
"metadata": { | ||
"id": "Repm9hXXd" | ||
}, | ||
"panelState": { | ||
"settings": { | ||
"value": null, | ||
"language": "python" | ||
}, | ||
"fileMetadata": { | ||
"id": "/2_example.py", | ||
"itemName": "/2_example.py" | ||
}, | ||
"isPreview": true | ||
} | ||
}, | ||
"title": "2_example.py", | ||
"id": "Repm9hXXd", | ||
"componentName": "lm-react-component", | ||
"isClosable": true, | ||
"reorderEnabled": true, | ||
"componentState": null | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"version": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import matplotlib.pyplot as plt | ||
|
||
plt.figure() | ||
x = [0, 2, 4, 6] | ||
y = [1, 3, 4, 8] | ||
plt.plot(x, y) | ||
plt.xlabel("x values") | ||
plt.ylabel("y values") | ||
plt.title("plotted x and y values") | ||
plt.legend(["line 1"]) | ||
|
||
m_figure = plt.gcf() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
df["body-style"].unique() | ||
|
||
df["body_style1"] = df["body-style"].replace( | ||
{"convertible": 1, "hatchback": 2, "sedan": 3, "wagon": 4, "hardtop": 5} | ||
) | ||
|
||
gr = df.groupby("body_style1")["peak-rpm", "price"].agg("mean") | ||
x = gr.index | ||
y = gr["peak-rpm"] | ||
z = [0] * 5 | ||
colors = ["b", "g", "crimson", "r", "pink"] | ||
dx = 0.3 * np.ones_like(z) | ||
dy = [30] * 5 | ||
dz = gr["price"] | ||
fig = plt.figure(figsize=(10, 8)) | ||
ax = fig.add_subplot(111, projection="3d") | ||
ax.set_xticklabels(["convertible", "hatchback", "sedan", "wagon", "hardtop"]) | ||
ax.set_xlabel("Body Style", labelpad=7) | ||
ax.set_yticks(np.linspace(5000, 5250, 6)) | ||
ax.set_ylabel("Peak Rpm", labelpad=10) | ||
ax.set_zlabel("Price") | ||
ax.set_zticks(np.linspace(7000, 22250, 6)) | ||
ax.set_title("Change of Price with Body_style and Peak RPM") | ||
ax.bar3d(x, y, z, dx, dy, dz) |
11 changes: 6 additions & 5 deletions
11
data/notebooks/5example_tri_surf.py → data/storage/notebooks/5_example_tri_surf.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
def z_function(x, y): | ||
return np.sin(np.sqrt(x**2 + y**2)) | ||
|
||
|
||
plt.figure(figsize=(8, 8)) | ||
ax = plt.axes(projection="3d") | ||
x = df['peak-rpm'] | ||
y = df['city-mpg'] | ||
x = df["peak-rpm"] | ||
y = df["city-mpg"] | ||
z = z_function(x, y) | ||
ax.plot_trisurf(x, y, z, | ||
cmap='viridis', edgecolor='none'); | ||
ax.plot_trisurf(x, y, z, cmap="viridis", edgecolor="none") | ||
ax.set_xlabel("Peak RPM") | ||
ax.set_ylabel("City-MPG") | ||
ax.set_title("Peak RPM vs City-MPG") | ||
ax.view_init(60, 25) | ||
plt.show() | ||
|
||
tri_surf=plt.gcf() | ||
tri_surf = plt.gcf() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,9 @@ | ||
version: "3.4" | ||
version: "3" | ||
|
||
services: | ||
server: | ||
build: ./server | ||
expose: | ||
- '8080' | ||
volumes: | ||
- ./data:/data | ||
- api-cache:/cache | ||
environment: | ||
- JAVA_TOOL_OPTIONS=-Xmx4g -Ddeephaven.console.type=python | ||
|
||
web: | ||
build: ./web | ||
expose: | ||
- '80' | ||
volumes: | ||
- ./data:/data | ||
- web-tmp:/tmp | ||
|
||
grpc-proxy: | ||
image: ghcr.io/deephaven/grpc-proxy:${VERSION:-latest} | ||
environment: | ||
- BACKEND_ADDR=server:8080 | ||
depends_on: | ||
- server | ||
expose: | ||
- '8080' | ||
|
||
envoy: | ||
image: ghcr.io/deephaven/envoy:${VERSION:-latest} | ||
depends_on: | ||
- web | ||
- grpc-proxy | ||
- server | ||
ports: | ||
- "${DEEPHAVEN_PORT:-10000}:10000" | ||
|
||
examples: | ||
image: ghcr.io/deephaven/examples:latest | ||
volumes: | ||
- ./data:/data | ||
command: initialize | ||
|
||
volumes: | ||
web-tmp: | ||
api-cache: | ||
- "10000:10000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
FROM ghcr.io/deephaven/server:${VERSION:-latest} | ||
# pip install any of the plugins required on the server | ||
# syntax=docker/dockerfile:1.4 | ||
|
||
FROM ghcr.io/deephaven/web-plugin-packager:latest as build | ||
RUN ./pack-plugins.sh @deephaven/js-plugin-matplotlib | ||
|
||
FROM ghcr.io/deephaven/server:edge | ||
RUN pip install deephaven-plugin-matplotlib | ||
COPY --link --from=build js-plugins/ /opt/deephaven/config/js-plugins/ | ||
COPY --link deephaven.prop /opt/deephaven/config/deephaven.prop |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a line at the bottom of the README that we should remove since we removed the examples: