Skip to main content

All Questions

Tagged with
2 votes
0 answers
156 views

How Can I Make Kate Properly Indent Snippets with Multiple Lines

I enjoy using Kate snippets for quick Python scripts, but I'm having a hard time getting them to properly inherit or detect indentation levels after the first line. Consider the following snippet: ...
WesH's user avatar
  • 470
1 vote
1 answer
983 views

Jupyter Notebook Extension: Snippets menu is not working after enabling nbextensions

After I have installed nbextensions, I have enabled a few extensions such as Hinterland, Snippets, and Snippets Menu. The other extensions are working pretty fine, except for Snippets Menu. I am not ...
Krazy_JT's user avatar
0 votes
0 answers
38 views

Can you give me feedback on a small python refactor

I've a small snippet of python code and i'm trying to refactor a block, how could i approach this problem? def function(): samples = [] for i in samples: if i == 1: # ...
Gabriel Salazar's user avatar
0 votes
0 answers
321 views

scrape google search snippet results with arabic query in python

I need to extract the google search result snippets for Arabic queries. I am using serpapi in Python. My code is as follows: from serpapi import GoogleSearch import os params = { "engine&...
Sara Saad's user avatar
0 votes
0 answers
209 views

Is there a way for a user to make a file that has boilerplate or precoded code?

I am trying to make an extension that has the ability to, by GUI or by command, create a python file that has code in it upon creation. I know you can make snippet that allows you to type in a command ...
user avatar
0 votes
1 answer
730 views

Django CKEditor Code Snippet not rendered correctly

I am building a Django blog that supports code snippets for both post and comments. The following is my CKEditor config in settings.py CKEDITOR_CONFIGS = { 'default': { 'toolbar': 'full', ...
disguisedtoast's user avatar
0 votes
1 answer
579 views

How to Format Python code as Python snippets on stack overflow? [closed]

How to format Python code as Python snippets on stack overflow since we can only do it as JavaScript or HTML or CSS snippets?
Python_Guy's user avatar
0 votes
0 answers
294 views

VS Code Snippets - How to Add List of Files to Choice Variable

I have a snippet that imports a library that I use often. I would like to add a choice variable based on the files in the library. So in the example below ${1:Package} would fill with all the files in ...
Talon06's user avatar
  • 1,796
-2 votes
1 answer
357 views

How can I import two or more packages in jupyter notebook?

I want to import the following packages with snippets in jupyter notebook: import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import yfinance as yf I tried ...
Reza's user avatar
  • 35
-6 votes
2 answers
1k views

HOW TO PRINT 1,000,000 IN PYTHON AS IT IS I KNOW WHY IT IS PRINTED AS 1 0 0 BUT HOW TO PRINT IT AS IT IS? WITHOUT CONSIDRING 1,000,000 A STRING [duplicate]

input-print(1,000,000) output-1 0 0
0Ptic0p's user avatar
  • 59
1 vote
1 answer
108 views

Remove $TM_CURRENT_LINE after inserting snippet

Trying to create a snippet in sublime Text 4 where the tab trigger is .print eg: a.print results in print(a) The current code for the snippet is <snippet> <content><![CDATA[print($...
Jithin Johnson's user avatar
0 votes
0 answers
1k views

Adding code snippet to a HTML page made using Tailwind CSS

I am making an HTML page using Tailwind CSS and want to add (python) code snippets to it. is there a way to do it?
Siddhesh Agarwal's user avatar
0 votes
1 answer
73 views

Sublime Text x Python - @property

I'm new to sublime text and would like to disable the auto-fill when I enter @pro... for @property and choose the suggestion. It fills in a function using the private variable syntax, which I rarely ...
kendfss's user avatar
  • 524
2 votes
1 answer
1k views

VS Code not showing useful Python code snippets

Visual Studio Code is not showing Python code snippets anymore. I don't know if this is a bug from Python Language Server (which I have already tried Jedi, Microsoft and Pylance) or a VSCode problem. ...
dsenese's user avatar
  • 172
12 votes
2 answers
8k views

VS Code No Longer Shows Default Code Snippet for Python

For some unknown reasons, my VS code no longer shows the default code snippets for Python. Below is what I see when I type for in the editor (to write the for loop) I'm expecting to see something ...
Nik Muhammad Naim's user avatar

15 30 50 per page