Interesting Tags
   11 tags on

1 answer

Writing python chunking loops with reference to another txt

I've been working on this for a while and I'm getting pretty frustrated with it. Basically, I have two text documents that both have important information. The first document contains some information ...

0 answers

Set DataFrame row to a different column

The Setup Using cell = pd.read_csv('test_cell.txt',header=2,sep='\t') I create a pandas DataFrame object that looks like this: Name Description LN18 22RV1 DU145 0 100009676_at ...

1 answer

Why python directory changes in

im relatively new in python community. the problem is that i changed the python directory(what i mean from this, is that where i save my work in python, its a folder in drive 'C') i want to change my ...

1 answers | 3 mins ago by shahbaz on Stack Overflow stackoverflow.com
0 answers

Python code not understood please help me

Any one understand what is coding i am new in python. why we are returning the lgd ugd ana qual_pc, with array format please help me i am stuck here def setup(con): cpd = ...

1 answer

Django form_valid() and form_invalid() in CreateView not called

I am currently using django's CreateView to post data to the database. Unfortunately, the method where I would like to save and perform custom logic, form_valid() is never called. I read on another ...

3 answers

How to compare a value from a dictionary

The structure is this: {ID: [name, last name, login, password} dic={'0002': ['Frank', 'Castle', 'franstle', 'franny.casty'], '0001': ['Juan', 'Botero', 'jbotero', 'snf23jn4'], '0003': ['Logan', ...

3 answers | 6 mins ago by LuisJ on Stack Overflow stackoverflow.com
1 answer

How do I get the recent json object based on datetime value?

Suppose I have json data where unique value in each record is datetime. How do I get the latest one? Sample Json: { "jobs": [ { id: 1, startTime: Wed 15 Jul 2015 15:39:33 GMT, somekey: ...

0 answers

Python imports wrong version of library outside of virtualenv

Need help updating a python package. I have an implementation that requires the following import from twisted.internet.ssl import optionsForClientTLS "optionsForClientTLS" was added to the ...

0 answers

kivy - how to create realtime listview

I am new to programming and kivy. I want to make a simple app. People input something in the app. And then, I show it in a sorted listview in the second screen. They also can add/remove item from the ...

1 answer

how to accelerate leftouterjoin in spark

How to accelerate leftouterjoin in spark I run a job in Spark. The leftouterjoin become the bottleneck for the whole job. So it is necessary to optimize the leftouterjoin in spark. It is a ...

1 answer

Flask-Sqlalchemy: DB queries don't return new data

I'm building an app that receives webhooks from one service, stores the data in a database, then makes the data available via API. I'm able to successfully add data to my app, but when I query the ...

1 answer

Pandas Efficient Way to Calculate Annual Inventory Based on Equipment Date Ranges

I'm looking to translate a dataframe of equipment date ranges and characteristics into their annual total install time by characteristic groupings. I'm looking to translate a dataframe like this: ...

1 answers | 12 mins ago by khammel on Stack Overflow stackoverflow.com
1 answer

python pointer error: unexpected variable mutation

def divide_grid(): G = [[1, 'p'], [2, 'g'], [3, 'r'], [4, 'p']] print(G) for color in ['p','g']: lst = G process(lst) print(G) def process(grid): grid[0][1] ...

3 answers

palindrome , can't return False for no string

A palindrome is a word, phrase, number or other sequence of units that can be read the same way in either direction. Write a function that determines whether the given word or number is a palindrome. ...

3 answers | 14 mins ago by ravenwingz on Stack Overflow stackoverflow.com
0 answers

Unstable loading time when using mod_wsgi on Windows

My system has following version of software installed: httpd 2.4.16 win64 Python 3.4.3 amd64 mod_wsgi 4.4.13 ap24vc10 cp34 none win amd64 I have created two environment using virtualenv for two ...

0 answers

How to select widget by id?

I want to add many widgets on python code like this, for item in parsed_result: time.sleep(0.01) btn = Button(text=item['id'], size_hint=(.5, None), height=32, ...

2 answers

Calling QMainWindow From Second QDialog

My PyQt application starts with Login screen. If password OK, a module-screen (with icons) appears. When user click some button, a QMainWindow will appears. But I can't do this because of qmainwindow ...

2 answers | 16 mins ago by Rictrunks on Stack Overflow stackoverflow.com
1 answer

Python program to enter numbers into search box

I'm brand new to Stack Overflow and I have an intermediate knowledge of Python,Javascript, and HTML. I'm trying to get pointed in the right direction here. At the library where I work we have a cart ...

0 answers

create executable with py2exe from a script that imports openpyxl

I am building a console application that writes *.xlsx files. Ideally (and planning for future functionality) I would like to also read existing files and write a modified version out. Therefore, I ...

3 answers

appending a class to list results in appending str error python

So I my program has a class with a persons name. I am trying to have the program read it off from a input file and then read it and arrange it into classes. While I am trying to appened the class to a ...

3 answers | 24 mins ago by Nikita Belooussov on Stack Overflow stackoverflow.com
0 answers

How to add Auto Numbring to rows in grid?

I'm using a grid in wxpython, I'm getting the data from SQL query. I want to add another column which will be the number of row. Assume that the SQL query can not be modified. if there are 4 rows ...

1 answer

How to upload photos to a image hosting server programmatically?

Hi guys I was wondering how does one upload pics to a image hosting site programmatically through python or java (python preferred). The site gives no ftp access just through a upload button on the ...

1 answers | 28 mins ago by Jonah on Stack Overflow stackoverflow.com
4 answers

atomic writing to file with Python

I am using Python to write chunks of text to files in a single operation: open(file, 'w').write(text) If the script is interrupted so a file write does not complete I want to have no file rather ...

4 answers | 31 mins ago by hoju on Stack Overflow stackoverflow.com
1 answer

TeamCity isn't accepting an array as parameter value

I have a python script which generates a list of host names that I need to use in another step. The list I am trying to pass in is standard array format: ['12R214PS93A8G', '12R214WB93A8G', ...

1 answers | 32 mins ago by Progger on Stack Overflow stackoverflow.com
1 answer

How does Twisted reactor loop know that it should invoke recv and how does it know which function to call?

I am testing a client server in twisted. There are three identical servers, each is sending a large chunk of data through sendall(). There is a client which implements a reactor and receives data as ...

1 answers | 33 mins ago by Pippi on Stack Overflow stackoverflow.com
1 answer

Adding a column to a dataframe in pandas based on text in files (Python)

I have a dataframe with a column consisting of a bunch of document numbers, all of which follow the same format, like so: id doc 0 A/BC/998 1 A/BC/999 2 A/BC/1000 3 A/BC/1001 4 A/BC/1002 ...

1 answers | 36 mins ago by user3817675 on Stack Overflow stackoverflow.com
0 answers

execute commands in pseudo terminal python

I want to write a small script to automate some commands in python and linux. there is 'crash' utility in linux used to debug kernel cores and there are some sort of standard commands which I want to ...

1 answer

Failed scipy.special import “Symbol not found: ___addtf3”

Whenever I attempt to run this code: from scipy.special import legendre I keep encountering the following error. ImportError: ...

1 answers | 41 mins ago by wil3 on Stack Overflow stackoverflow.com
1 answer

How to speed up web scraping with nested urllib2.urlopen() in Python?

I have the following code to gather the number of words there are in each chapter of a book. In a nutshell, it opens the url of each book, then the urls of each chapter associated with the book. ...

1 answer

Append columns to empty numpy array in python

I have to fill a text file with columns of data, showing variation of some variables in time. For each variable I want to create a column array and then concatenate them all in a single matrix to be ...

1 answers | 45 mins ago by user2078621 on Stack Overflow stackoverflow.com
15 30 50 per page
1 2 3