vscode python comment togglging does not work - visual-studio-code

I'm new to vscode.
I have used shortcut (commad + /) for toggling comments. But nowadays, this does not work for python codes. (This still work for my java codes) I guess some problems exist with python extensions but not sure. Can anybody help me?
Below is my environment.
System information
CPUs | Intel(R) Core(TM) i5-5257U CPU # 2.70GHz (4 x 2700)
-- | --
GPU Status | 2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_off_okwebgl: enabledwebgl2: enabled
Load (avg) | 3, 3, 3
Memory (System) | 8.00GB (0.38GB free)
Process Argv | .
Screen Reader | no
VM | 0%
Extensions installed
Extension | Author (truncated) | Version
-- | -- | --
vscode-django | bat | 0.20.0
npm-intellisense | chr | 1.3.0
path-intellisense | chr | 2.2.1
bracket-pair-colorizer | Coe | 1.0.61
vscode-markdownlint | Dav | 0.36.3
vscode-eslint | dba | 2.1.8
githistory | don | 0.6.9
python-extension-pack | don | 1.6.0
LogFileHighlighter | emi | 2.9.0
json-tools | eri | 1.0.2
prettier-vscode | esb | 5.5.0
code-runner | for | 0.11.0
mdmath | goe | 2.5.1
gc-excelviewer | Gra | 3.0.40
vscode-auto-open-markdown-preview | hnw | 0.0.4
vsc-python-indent | Kev | 1.11.0
node-module-intellisense | lei | 1.5.0
sftp | lix | 1.12.9
MagicPython | mag | 1.1.0
rainbow-csv | mec | 1.7.1
dotenv | mik | 1.0.1
prettify-json | moh | 0.0.3
vscode-language-pack-ko | MS- | 1.48.3
python | ms- | 2020.8.106424
remote-containers | ms- | 0.134.1
remote-ssh | ms- | 0.51.0
remote-ssh-edit | ms- | 0.51.0
remote-wsl | ms- | 0.44.5
vscode-remote-extensionpack | ms- | 0.20.0
color-highlight | nau | 2.3.0
vscode-jsp | pth | 0.0.3
vscode-data-preview | Ran | 2.0.0
ruby | reb | 0.27.0
java | red | 0.66.0
code-settings-sync | Sha | 3.4.3
trailing-spaces | sha | 0.3.1
guides | spy | 0.9.3
addDocComments | ste | 0.0.8
vscodeintellicode | Vis | 1.2.10
vscode-java-debug | vsc | 0.28.0
vscode-java-dependency | vsc | 0.13.0
vscode-java-pack | vsc | 0.10.0
vscode-java-test | vsc | 0.24.1
vscode-maven | vsc | 0.24.2
vscode-icons | vsc | 10.2.0
vscode-wakatime | Wak | 4.0.7
jinja | who | 0.0.8
vscode-ruby | win | 0.27.0
JavaScriptSnippets | xab | 1.8.0
Settings.json
{
"editor.minimap.enabled": false,
"workbench.colorTheme": "Visual Studio Dark",
"editor.renderIndentGuides": false,
"window.zoomLevel": 0,
"git.ignoreLegacyWarning": true,
"terminal.integrated.scrollback": 50000,
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"terminal.integrated.commandsToSkipShell": [
"workbench.action.quickOpen"
],
"editor.rulers": [
80,
120
],
"dashboard.projectData": null,
"java.requirements.JDK11Warning": false,
"java.semanticHighlighting.enabled": true,
"python.languageServer": "Microsoft",
}

Have you tried using Ctrl+K+C ?
and to uncomment use Ctrl+K+U .
And the issue with your vscode might be that the shortcut is not registered.
Follow this link to register the shortcut, if you prefer Ctrl+/.
https://marketplace.visualstudio.com/items?itemName=munyabe.ToggleComment

Related

Nexus Repository upload plugin for Fastlane

I am working on a mobile CI/CD and using Fastlane for the scripting / actions support. The organization wants to put the Android and IOS artifacts in the Nexus Repository Manager, so I looked for an action and/or plugin for FastLane. Sure enough there is an action: Fastlane action for nexus upload and a plugin (source) in GitHub: Source for nexus_upload plugin to Fastlane.
I am unable to get the action to work and it throws a mysterious error:
$ bundle exec fastlane uploadToServer
[✔] 🚀
+----------------------------------+---------+------------------+
| Used plugins |
+----------------------------------+---------+------------------+
| Plugin | Version | Action |
+----------------------------------+---------+------------------+
| fastlane-plugin-upload_to_server | 0.1.6 | upload_to_server |
+----------------------------------+---------+------------------+
[13:30:01]: ------------------------------
[13:30:01]: --- Step: default_platform ---
[13:30:01]: ------------------------------
[13:30:01]: Lane name 'env' is invalid! Invalid names are run, init, new_action, lanes, list, docs, action, actions, enable_auto_complete, new_plugin, add_plugin, install_plugins, update_plugins, search_plugins, help, env, update_fastlane.
[!] Lane name 'env' is invalid
Try the following to get the parameters.
enter $ fastlane action nexus_upload
[✔] 🚀
[13:35:41]: fastlane detected a Gemfile in the current directory
[13:35:41]: However, it seems like you didn't use `bundle exec`
[13:35:41]: To launch fastlane faster, please use
[13:35:41]:
[13:35:41]: $ bundle exec fastlane action nexus_upload
[13:35:41]:
[13:35:41]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
+----------------------------------+---------+------------------+
| Used plugins |
+----------------------------------+---------+------------------+
| Plugin | Version | Action |
+----------------------------------+---------+------------------+
| fastlane-plugin-upload_to_server | 0.1.6 | upload_to_server |
+----------------------------------+---------+------------------+
Loading documentation for nexus_upload:
+--------------------------------------------------------------------------+
| nexus_upload |
+--------------------------------------------------------------------------+
| Upload a file to "Sonatype Nexus platform" (https://www.sonatype.com 🔗) |
| |
| Created by xfreebird, mdio |
+--------------------------------------------------------------------------+
+----------------------+-----------------------------------------------+-------------------------------+---------+
| nexus_upload Options |
+----------------------+-----------------------------------------------+-------------------------------+---------+
| Key | Description | Env Var | Default |
+----------------------+-----------------------------------------------+-------------------------------+---------+
| file | File to be uploaded to Nexus | FL_NEXUS_FILE | |
| repo_id | Nexus repository id e.g. artefacts | FL_NEXUS_REPO_ID | |
| repo_group_id | Nexus repository group id e.g. com.company | FL_NEXUS_REPO_GROUP_ID | |
| repo_project_name | Nexus repository commandect name. Only | FL_NEXUS_REPO_PROJECT_NAME | |
| | letters, digits, underscores(_), hyphens(-), | | |
| | and dots(.) are allowed | | |
| repo_project_version | Nexus repository commandect version | FL_NEXUS_REPO_PROJECT_VERSION | |
| repo_classifier | Nexus repository artifact classifier | FL_NEXUS_REPO_CLASSIFIER | |
| | (optional) | | |
| endpoint | Nexus endpoint e.g. http://nexus:8081 | FL_NEXUS_ENDPOINT | |
| mount_path | Nexus mount path (Nexus 3 instances have | FL_NEXUS_MOUNT_PATH | /nexus |
| | this configured as empty by default) | | |
| username | Nexus username | FL_NEXUS_USERNAME | |
| password | Nexus password | FL_NEXUS_PASSWORD | |
| ssl_verify | Verify SSL | FL_NEXUS_SSL_VERIFY | true |
| nexus_version | Nexus major version | FL_NEXUS_MAJOR_VERSION | 2 |
| verbose | Make detailed output | FL_NEXUS_VERBOSE | false |
| proxy_username | Proxy username | FL_NEXUS_PROXY_USERNAME | |
| proxy_password | Proxy password | FL_NEXUS_PROXY_PASSWORD | |
| proxy_address | Proxy address | FL_NEXUS_PROXY_ADDRESS | |
| proxy_port | Proxy port | FL_NEXUS_PROXY_PORT | |
+----------------------+-----------------------------------------------+-------------------------------+---------+
* = default value is dependent on the user's system
More information can be found on https://docs.fastlane.tools/actions/nexus_upload here
Missing parameters will result in a dialog for the needed parameters:
$ bundle exec fastlane run nexus_upload username:"mobibob" password:"secretpassword" file:"./app/build/outputs/apk/debug/app-debug.apk"
[✔] 🚀
+----------------------------------+---------+------------------+
| Used plugins |
+----------------------------------+---------+------------------+
| Plugin | Version | Action |
+----------------------------------+---------+------------------+
| fastlane-plugin-upload_to_server | 0.1.6 | upload_to_server |
+----------------------------------+---------+------------------+
[13:34:22]: --------------------------
[13:34:22]: --- Step: nexus_upload ---
[13:34:22]: --------------------------
[13:34:22]: To not be asked about this value, you can specify it using 'repo_id'
[13:34:22]: Nexus repository id e.g. artefacts:

How to convert text-based table to image from terminal in the same structure?

I'm trying to convert text-based table to the image, but the structure is broken after convertation.
I have file with the next structure:
+-----------+------+------------+-----------------+
| City name | Area | Population | Annual Rainfall |
+-----------+------+------------+-----------------+
| Adelaide | 1295 | 1158259 | 600.5 |
| Brisbane | 5905 | 1857594 | 1146.4 |
| Darwin | 112 | 120900 | 1714.7 |
| Hobart | 1357 | 205556 | 619.5 |
| Sydney | 2058 | 4336374 | 1214.8 |
| Melbourne | 1566 | 3806092 | 646.9 |
| Perth | 5386 | 1554769 | 869.4 |
+-----------+------+------------+-----------------+%
after a conversation with ImageMagick and command below:
convert label:"$(cat test.txt)" result1.png
I have next image:
As you can see, the structure of the columns is broken.
Do you have an idea of how can such an issue be solved?
Regards,
Ihor
You need to set the TypeFace to something monospace to match the terminal.
convert -font "Liberation-Mono" label:#test.txt result1.png
You can identify which fonts on the system by running
identify -list font | grep Mono

nova diagnostics in devstack development

In ssh, when I run this command
nova diagnostics 2ad0dda0-072d-46c4-8689-3c487a452248
I got all the resources in devstack
+---------------------------+----------------------+
| Property | Value |
+---------------------------+----------------------+
| cpu0_time | 3766640000000 |
| hdd_errors | 18446744073709551615 |
| hdd_read | 111736 |
| hdd_read_req | 73 |
| hdd_write | 0 |
| hdd_write_req | 0 |
| memory | 2097152 |
| memory-actual | 2097152 |
| memory-available | 1922544 |
| memory-major_fault | 2710 |
| memory-minor_fault | 10061504 |
| memory-rss | 509392 |
| memory-swap_in | 0 |
| memory-swap_out | 0 |
| memory-unused | 1079468 |
| tap5a148e0f-b8_rx | 959777 |
| tap5a148e0f-b8_rx_drop | 0 |
| tap5a148e0f-b8_rx_errors | 0 |
| tap5a148e0f-b8_rx_packets | 8758 |
| tap5a148e0f-b8_tx | 48872 |
| tap5a148e0f-b8_tx_drop | 0 |
| tap5a148e0f-b8_tx_errors | 0 |
| tap5a148e0f-b8_tx_packets | 615 |
| vda_errors | 18446744073709551615 |
| vda_read | 597230592 |
| vda_read_req | 31443 |
| vda_write | 164690944 |
| vda_write_req | 18422 |
+---------------------------+----------------------+
How can I get this in devstack user interfaces.
Please help..
Thanks in advance
its not available in openstack icehouse/juno version though it can be edited in juno to retrieve in devstack.
I didn't use openstack Kilo. In juno, if your hypervisor is libvirt, Vsphere or XenAPI then you can retrive this statistics in devstack UI. for this you have to do this:
For Libvirt
In this location ceilometer/compute/virt/libvirt/inspector.py, add this:
from oslo.utils import units
from ceilometer.compute.pollsters import util
def inspect_memory_usage(self, instance, duration=None):
instance_name = util.instance_name(instance)
domain = self._lookup_by_name(instance_name)
state = domain.info()[0]
if state == libvirt.VIR_DOMAIN_SHUTOFF:
LOG.warn(_('Failed to inspect memory usage of %(instance_name)s, '
'domain is in state of SHUTOFF'),
{'instance_name': instance_name})
return
try:
memory_stats = domain.memoryStats()
if (memory_stats and
memory_stats.get('available') and
memory_stats.get('unused')):
memory_used = (memory_stats.get('available') -
memory_stats.get('unused'))
# Stat provided from libvirt is in KB, converting it to MB.
memory_used = memory_used / units.Ki
return virt_inspector.MemoryUsageStats(usage=memory_used)
else:
LOG.warn(_('Failed to inspect memory usage of '
'%(instance_name)s, can not get info from libvirt'),
{'instance_name': instance_name})
# memoryStats might launch an exception if the method
# is not supported by the underlying hypervisor being
# used by libvirt
except libvirt.libvirtError as e:
LOG.warn(_('Failed to inspect memory usage of %(instance_name)s, '
'can not get info from libvirt: %(error)s'),
{'instance_name': instance_name, 'error': e})
for more details you can check the following link:
https://review.openstack.org/#/c/90498/

Unable to start HandlerSocket with mariadb

For some reason, I cannot get HandlerSocket to start listening when I start mariadb (version
10.0.14). I am using Cent OS 6.5.
my.cnf has the following settings:
handlersocket_port = 9998
handlersocket_port_wr = 9999
handlersocket_address = 127.0.0.1
Calling "SHOW GLOBAL VARIABLES LIKE 'handlersocket%'" from the mariaDb prompt shows:
+-------------------------------+-----------+
| Variable_name | Value |
+-------------------------------+-----------+
| handlersocket_accept_balance | 0 |
| handlersocket_address | 127.0.0.1 |
| handlersocket_backlog | 32768 |
| handlersocket_epoll | 1 |
| handlersocket_plain_secret | |
| handlersocket_plain_secret_wr | |
| handlersocket_port | 9998 |
| handlersocket_port_wr | 9999 |
| handlersocket_rcvbuf | 0 |
| handlersocket_readsize | 0 |
| handlersocket_sndbuf | 0 |
| handlersocket_threads | 16 |
| handlersocket_threads_wr | 1 |
| handlersocket_timeout | 300 |
| handlersocket_verbose | 10 |
| handlersocket_wrlock_timeout | 12 |
+-------------------------------+-----------+
I can start mariadb successfully, but when I check to see which ports are actively listening,
neither 9998 nor 9999 show up. I've checked the mysqld.log file, but no errors seem to be occurring.
Answering my own question here -
SELINUX needed to be set to permissive mode to get HandlerSocket started.

Which version of OSGi is implemented by which version of Eclipse/Equinox?

We are looking for a table which matches Eclipse/Equinox release versions to the corresponding OSGi Service Platform specification release version.
Eclipse/Equinox wiki doesn't have any info on this in a structured form.
The release archaeology is quite hard. So far we have these versions collected:
Year | Eclipse | Release | OSGi spec | Equinox implementation version
| version | name | version | org.eclipse.osgi | org.eclipse.osgi.services
-----|---------|----------|-----------|------------------|--------------------------
2004 | 3.0 | | 4.0 early | |
2005 | 3.1 | | 4.0 draft | |
2006 | 3.2 | Callisto | 4.0 | |
2007 | 3.3 | Europa | 4.1 | |
2008 | 3.4 | Ganymede | 4.1 | o.e.o_3.4.x | o.e.o.services_3.1
2009 | 3.5 | Galileo | 4.2 | o.e.o_3.5.x | o.e.o.services_3.2
2010 | 3.6 | Helios | 4.2 | o.e.o_3.6.x | o.e.o.services_3.2
2011 | 4.1/3.7 | Indigo | 4.3 | o.e.o_3.7.x | o.e.o.services_3.3
2012 | 4.2/3.8 | Juno | 5 | o.e.o_3.8.2 | o.e.o.services_3.3.100
2013 | 4.3 | Kepler | 5 | o.e.o_3.9.x | o.e.o.services_3.3
2014 | 4.4 | Luna | 5 | o.e.o_3.10.x | o.e.o.services_3.4
2015 | 4.5 | Mars | 5 | o.e.o_3.10.102 | o.e.o.services_3.5
2016 | 4.6 | Neon | 6 | o.e.o_3.11.x | o.e.o.services_3.5
2017 | 4.7 | Oxygen | 6 | o.e.o_3.12.x | o.e.o.services_3.6
2018 | 4.8 | Photon | 6 | o.e.o_3. | o.e.o.services_3.6
2018 | 4.9 | 2018-09 | 6 | o.e.o_3. | o.e.o.services_?
2018 | 4.10 | 2018-12 | 6 | o.e.o_3.13.200 | o.e.o.services_3.7.0
2019 | 4.11 | 2019-03 | 6 | o.e.o_3.13.300 | o.e.o.services_3.8.0
2019 | 4.12 | 2019-06 | 7 | o.e.o_3.14.0 | o.e.o.services_3.8.0
2019 | 4.13 | 2019-09 | 7 | o.e.o_3.14.x | o.e.o.services_3.x
2019 | 4.14 | 2019-12 | | |
2020 | 4.15 | 2020-03 | | |
2020 | 4.16 | 2020-06 | | |
2020 | 4.17 | 2020-09 | | |
2020 | 4.18 | 2020-12 | | |
2021 | 4.19 | 2021-03 | | |
2021 | 4.20 | 2021-06 | | |
2021 | 4.21 | 2021-09 | | |
2021 | 4.22 | 2021-12 | | |
2022 | 4.23 | 2022-03 | | |
2022 | 4.24 | 2022-06 | | |