| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent df3ed6d commit f1deef6
9 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,34 @@ | |||
| 1 | + #------------------------------------------------------------------------------------------------------------- | ||
| 2 | + # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| 3 | + # Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. | ||
| 4 | + #------------------------------------------------------------------------------------------------------------- | ||
| 5 | + | ||
| 6 | + FROM node:8 | ||
| 7 | + | ||
| 8 | + # Configure apt | ||
| 9 | + ENV DEBIAN_FRONTEND=noninteractive | ||
| 10 | + RUN apt-get update \ | ||
| 11 | + && apt-get -y install --no-install-recommends apt-utils 2>&1 | ||
| 12 | + | ||
| 13 | + # Verify git and needed tools are installed | ||
| 14 | + RUN apt-get install -y git procps | ||
| 15 | + | ||
| 16 | + # Remove outdated yarn from /opt and install via package | ||
| 17 | + # so it can be easily updated via apt-get upgrade yarn | ||
| 18 | + RUN rm -rf /opt/yarn-* \ | ||
| 19 | + && rm -f /usr/local/bin/yarn \ | ||
| 20 | + && rm -f /usr/local/bin/yarnpkg \ | ||
| 21 | + && apt-get install -y curl apt-transport-https lsb-release \ | ||
| 22 | + && curl -sS https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/pubkey.gpg | apt-key add - 2>/dev/null \ | ||
| 23 | + && echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ | ||
| 24 | + && apt-get update \ | ||
| 25 | + && apt-get -y install --no-install-recommends yarn | ||
| 26 | + | ||
| 27 | + # Install tslint and typescript | ||
| 28 | + RUN npm install -g tslint typescript | ||
| 29 | + | ||
| 30 | + # Clean up | ||
| 31 | + RUN apt-get autoremove -y \ | ||
| 32 | + && apt-get clean -y \ | ||
| 33 | + && rm -rf /var/lib/apt/lists/* | ||
| 34 | + ENV DEBIAN_FRONTEND=dialog | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,8 @@ | |||
| 1 | + // See https://aka.ms/vscode-remote/devcontainer.json for format details. | ||
| 2 | + { | ||
| 3 | + "name": "Node.js 8 & TypeScript", | ||
| 4 | + "dockerFile": "Dockerfile", | ||
| 5 | + "extensions": [ | ||
| 6 | + "ms-vscode.vscode-typescript-tslint-plugin" | ||
| 7 | + ] | ||
| 8 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,6 +2,22 @@ | |||
| 2 | 2 | { | |
| 3 | 3 | "version": "0.1.0", | |
| 4 | 4 | "configurations": [ | |
| 5 | + { | ||
| 6 | + "name": "Extension inside container", | ||
| 7 | + "type": "extensionHost", | ||
| 8 | + "request": "launch", | ||
| 9 | + "runtimeExecutable": "${execPath}", | ||
| 10 | + "args": [ | ||
| 11 | + "--extensionDevelopmentPath=${workspaceFolder}", "${workspaceFolder}/data" | ||
| 12 | + ], | ||
| 13 | + "stopOnEntry": false, | ||
| 14 | + "smartStep": true, | ||
| 15 | + "sourceMaps": true, | ||
| 16 | + "outFiles": [ | ||
| 17 | + "${workspaceFolder}/out/**/*" | ||
| 18 | + ], | ||
| 19 | + "preLaunchTask": "Compile" | ||
| 20 | + }, | ||
| 5 | 21 | { | |
| 6 | 22 | "name": "Python: Current File with iPython", | |
| 7 | 23 | "type": "python", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,3 @@ | |||
| 1 | + { | ||
| 2 | + "python.pythonPath": "/usr/bin/python3" | ||
| 3 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,2 @@ | |||
| 1 | + #%% | ||
| 2 | + print('hello') | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1 @@ | |||
| 1 | + Fix problems if other language kernels are installed that are using python under the covers (bash is one such example). | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -590,14 +590,17 @@ export class JupyterExecutionBase implements IJupyterExecution { | |||
| 590 | 590 | const spec = specs[i]; | |
| 591 | 591 | let score = 0; | |
| 592 | 592 | ||
| 593 | - if (spec && spec.path && spec.path.length > 0 && info && spec.path === info.path) { | ||
| 594 | - // Path match | ||
| 595 | - score += 10; | ||
| 596 | - } | ||
| 593 | + // First match on language. No point if not python. | ||
| 597 | 594 | if (spec && spec.language && spec.language.toLocaleLowerCase() === 'python') { | |
| 598 | 595 | // Language match | |
| 599 | 596 | score += 1; | |
| 600 | 597 | ||
| 598 | + // See if the path matches. Don't bother if the language doesn't. | ||
| 599 | + if (spec && spec.path && spec.path.length > 0 && info && spec.path === info.path) { | ||
| 600 | + // Path match | ||
| 601 | + score += 10; | ||
| 602 | + } | ||
| 603 | + | ||
| 601 | 604 | // See if the version is the same | |
| 602 | 605 | if (info && info.version && specDetails[i]) { | |
| 603 | 606 | const details = specDetails[i]; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments