Python 3 is the latest version of the Python programming language and was formally released on December 3rd, 2008. Use the more generic [python] tag if your question is not version-specific.

learn more…| top users | synonyms (4)|python 3.x jobs

0
votes
2answers
11 views

Trouble with exceptions in Python

I am learning about exceptions in python and I am having trouble with some code. the following code is:try:txt=open("C:\\Users\\Draco\\OneDrive\\Documents\\textfile.txt","r")try:...
-1
votes
1answer
25 views

Remove redundant newlines in Python source code

I am doing some shady Python source code hacking. I should probably work at the AST level, but for now I am doing everything via direct string manipulation. To make life simpler, I have a function ...
0
votes
0answers
3 views

How to import Houndify into Python 3 script after downloading software development kit from website

I am trying to use Houndify with Python 3.6. I have downloaded the Python software development kit from here which includes houndify.py. What should I do with this file so that I can actually use it ...
0
votes
0answers
10 views

How do I get an float from the string I get in a combobox in Python 3.x?

Here's the situation:I need to get a value (float) from the selected option in the combobox (a string) and I don't know how to do it.from tkinter import *from tkinter import ttkcombo=ttk....
0
votes
1answer
7 views

In Python, how do I generate random data sets within a range, that follow a function's output?

For instance, this works to return N data points according to the function timestwo(x), but fails to use the whole mymin to mymax range because random.random() returns floats between 0.0 and 1.0. Any ...
0
votes
1answer
7 views

Django 1.9 No module named 'django.urls'

Trying to install pcapdb on a fresh debian install (requires django==1.9) installed via 'sudo pip3 install django==1.9' Other parts of django can be imported without issue e.g. django.conf, django.db, ...
0
votes
3answers
20 views

Reverse number triangle

I am trying to create a reverse triangle like this:012345678901234567801234567012345601234501234012301201...
0
votes
0answers
3 views

balance classes inside kfold loop

I need to balance the classes inside kfold loop,then train the model and then predict the outcome with a different dataset altogether.Can I get a sample code to illustrate this concept.
0
votes
0answers
3 views

SQLAlchemy Relationships - Beginners traps

i started learning python3 with SQLAlchemy. No i created a quick example Database with a User Table and an Group Table.CREATE TABLE `USER` (`ID` int(11) NOT NULL AUTO_INCREMENT,`NAME` varchar(...
0
votes
0answers
10 views

HTML Scraping when there are no html tags

I'm trying to get the elevation data, and start and end pass times from this website.So far I have looked at the source code and been unable to use Beautiful Soup to get what I want as the source ...
0
votes
1answer
19 views

Understanding a Linked List implementation in Python

I have found an implementation of a Linked List in Python, online, but it doesn't have any explanation or comments.I understand the underlying concepts of a Linked List, but there is one key part of ...
0
votes
0answers
12 views

Unexpected Behavior With Selenium Webscraping

I am baffled about the output I am receiving for the following function. I don't understand why I am getting an error. Can anyone run this and see if they can determine how I can properly scrape all ...
0
votes
1answer
12 views

How to update bulk in SQLalchemy?

I have an array of dictionaries as:dict=[{"1": "name"}, {"2": "name1"}]How to use bulk update rows by keys: 1 and 2So, I need perform this query: UPDATE images set name="name1" WHERE id=2
0
votes
1answer
15 views

Unpacking list of tuples as numpy array for Experience replay

I am implementing DDPG, for that purpose I am storing the experience as a tuple in a deque. When I sample experience from the deque, it is basically a list of tuple which I am unpacking using the ...
0
votes
1answer
14 views

RuntimeError: Could not find firefox in your system PATH. Please specify the firefox binary location or install firefox

Somebody...Who use Selenium with Firefox. Write:Which Firefox version you useWhich geckodriver version you useAnd which selenium version you useIt's badly annoying! I have Firefox version 58.0.2,...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,