Quantcast
Browsing all 14069 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Combining multiple plots with mayavi

I have a 3D contour plot, which I make with python's mayavi library, into which I want to overplot some arrows. For the contour plot I use mlab.contour3d and for the arrow mlab.quiver3d (link to the...

View Article


Why does the source code, which Veil compiles and runs successfully, not work...

When I obtain the payload output with Python in the Veil framework, the .exe file works successfully. However, when I copy the source code from the .py file to my computer and compile it, I encounter...

View Article


Python: Is there a way to remove a character without regard to...

My code is supposed to remove vowels from the user inputted string. It works correctly, but I'm trying to see if there is a way to simplify my code. A screenshot of my codeI originally didn't have the...

View Article

How to keep the format of data in a list to be unchanged after converting to...

I have a list called coo. the data in it is like the following:coo: [(0.0, 1.0), (1.0, 0.0)]coo: [(0.0, 1.0), (1.0, 0.0)]coo: [(0.0, 1.0), (1.0, 0.0)]coo: [(0.0, 1.0), (1.0, 0.0)]coo: [(0.0, 1.0),...

View Article

i need to write a code of almost sorted list search problem , not the linear...

i need the code to return true if the target is in list and false otherwiselst=[0, 1, 2, 3, 697, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,...

View Article


connect my Ml built"python"to my JS how can i?

I built my ML in Python, and I need to integrate it into my website, "HTML, CSS, and JS.", I use @tensorflow.tfjs in my prediction. Js page, and I added the path of the ML file, but it is not working....

View Article

Merging and concatinating simultaneously

I have multiple data frames, each representing monthly progress.My mission is to join them with two condition step by step.So here is three sample data frame, and I will try to explain what I want to...

View Article

Did the threading module change in Python 3? And if so, how?

I'm trying to understand the MT in Python. I found an example using threading.Lock. But it generated different outputs in Python 2.7 and Python 3.6, which really confused me.Here is the code: import...

View Article


Why does regular exp. give me an empty dictionary [closed]

Implement a function to parse a string containing data in text format. Explore the details of the format using the examples below. Return the result as a dictionary.Ex. 1Input:\begin {{...

View Article


How can I fix the error "code 501, message Unsupported method ('POST')" with...

I made a web page in HTML, CSS and JS where there is a form that must store data in a SQLite database and I have used Python (with Flask) as the intermediary API between the form and the database. The...

View Article

AttributeError: '_io.StringIO' object has no attribute 'buffer'?

I have this function that simply writes a string into a stream buffer:import sysfrom typing import IOdef write(s: str, stream: IO[bytes] = sys.stdout.buffer): stream.write(s.encode()) stream.flush()I'm...

View Article

Python-SocketIO , Yoloface: Is there a possibility that a function call is...

I am working on a Flask Server with SocketIO. I emplemented an event handler and this is working fine (i implemented the client in a Adroid Studio Project). I can emit and receive Messages without any...

View Article

Python: Cannot Run Linux Terminal Commands With Scripts [duplicate]

I have two virtual machines interacting with each other. One of them (Linux) communicates through the terminal via OracleVM, and the other (Windows) communicates through PuTTY.The connection is made by...

View Article


Image may be NSFW.
Clik here to view.

Bar Chart Not Stacking

I have been trying to adapt this tutorial, How to Use Chart.js with Django, to my AWS billing reports. I want to tweak this graph from the tutorial:I want to "stack" the costs from the various AWS...

View Article

Converting streamlit library time input to milliseconds since epoch

How to convert input from a streamlit time input widget to milliseconds since Unix Epoch? Time of the day comes from the time input widget and date have in the following string formatday = '20240325'...

View Article


How can Celery configure submodules' loggers?

My understanding is that @after_setup_logger.connect is supposed to allow you to attach custom handlers. However, this does not work for me.@after_setup_logger.connectdef setup_loggers(logger:...

View Article

Create table in Redshift through db_query() in Python

I'm trying to create a table in Redshift using db_query() with the following code:snapshot_date = '20240325'sql = """create table tablename""" + snapshot_date +""" as (select * from tablename)"""data =...

View Article


Image may be NSFW.
Clik here to view.

Python Shapely - Intersecting GEOMETRYCOLLECTION with POLYGON

I am using Shapely to intersect geographical data and Pyshp to write the results to a shapefile. I don't completely understand how "intersection" works.First, I create some points and calculate the...

View Article

ValueError: Row or column values must be at least 1 when using OpenPyXl

i have been using Python for Finance, by Yves Hilpisch, specifically chapter 12 as a guide to learning how to integrate Excel and Python. I am currently learning how to use OpenPyxl. However the code...

View Article

Python - Just wondering if someone can do a quick count script for reading a...

Sorry this is a real beginner question.I have a file with a number of URL's in it - I want to read the file and do a count for every URL in the file.file = open("URL.txt", "r")Counter = 0Content =...

View Article
Browsing all 14069 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>