Q_Id
int64
2.93k
49.7M
CreationDate
stringlengths
23
23
Users Score
int64
-10
437
Other
int64
0
1
Python Basics and Environment
int64
0
1
System Administration and DevOps
int64
0
1
DISCREPANCY
int64
0
1
Tags
stringlengths
6
90
ERRORS
int64
0
1
A_Id
int64
2.98k
72.5M
API_CHANGE
int64
0
1
AnswerCount
int64
1
42
REVIEW
int64
0
1
is_accepted
bool
2 classes
Web Development
int64
0
1
GUI and Desktop Applications
int64
0
1
Answer
stringlengths
15
5.1k
Available Count
int64
1
17
Q_Score
int64
0
3.67k
Data Science and Machine Learning
int64
0
1
DOCUMENTATION
int64
0
1
Question
stringlengths
25
6.53k
Title
stringlengths
11
148
CONCEPTUAL
int64
0
1
Score
float64
-1
1.2
API_USAGE
int64
1
1
Database and SQL
int64
0
1
Networking and APIs
int64
0
1
ViewCount
int64
15
3.72M
27,304,973
2014-12-04T22:01:00.000
0
0
0
0
0
python,tkinter
0
27,305,312
0
1
0
true
0
1
No, there isn't a way to tell what type of event is flagged by <<ListboxSelect>>. Using <<ListboxSelect>> is useless for binding to a letter key, however. It only will fire for mouse clicks and using the arrow keys to navigate the listbox. You can bind to <KeyPress>. That binding will tell you what key was pressed, an...
1
0
0
0
I am binding to ListBoxSelect and i want to implement a function which recognizes an alphabetical key-press and uses this to jump to the corresponding place in an alphabetically sorted list. Is there a way to tell what type of event is flagged by ListBoxSelect? I see something in the documentation about getting event "...
How to determine the type of event flagged by <> in Tkinter?
0
1.2
1
0
0
47
27,308,293
2014-12-05T03:32:00.000
-2
0
1
0
0
python,duplicates,package,pip
0
27,308,401
0
9
0
false
0
0
This is not possible with the pip command line tool. All of the packages on PyPI have unique names. Packages often require and depend on each other, and assume the name will not change.
5
51
0
0
When installing a new python package with PIP, can I change the package name because there is another package with the same name? Or, how can I change the existing package's name?
How to install python package with a different name using PIP
0
-0.044415
1
0
0
22,776
27,308,293
2014-12-05T03:32:00.000
13
0
1
0
0
python,duplicates,package,pip
0
55,817,170
0
9
0
false
0
0
It's not possible to change "import path" (installed name) by specifying arguments to pip. All other options require some form of "changes to the package": A. Use pip install -e git+http://some_url#egg=some-name: that way even if both packages have the same import path, they will be saved under different directories (u...
5
51
0
0
When installing a new python package with PIP, can I change the package name because there is another package with the same name? Or, how can I change the existing package's name?
How to install python package with a different name using PIP
0
1
1
0
0
22,776
27,308,293
2014-12-05T03:32:00.000
0
0
1
0
0
python,duplicates,package,pip
0
48,315,327
0
9
0
false
0
0
I Don't think it is possible to change the name of package by using pip. Because pip can install packages which are exist and gives error if there is no package name which you write for change the name of package.
5
51
0
0
When installing a new python package with PIP, can I change the package name because there is another package with the same name? Or, how can I change the existing package's name?
How to install python package with a different name using PIP
0
0
1
0
0
22,776
27,308,293
2014-12-05T03:32:00.000
2
0
1
0
0
python,duplicates,package,pip
0
49,680,767
0
9
0
false
0
0
If you are struggling to install the correct package when using pip install 'module', you could always download its corresponding wheel file (.whl extension) and then install this directly using pip. This has worked for me in various situations in the past.
5
51
0
0
When installing a new python package with PIP, can I change the package name because there is another package with the same name? Or, how can I change the existing package's name?
How to install python package with a different name using PIP
0
0.044415
1
0
0
22,776
27,308,293
2014-12-05T03:32:00.000
4
0
1
0
0
python,duplicates,package,pip
0
50,367,038
0
9
0
false
0
0
Create a new virtualenv and then install the package on new virtualenv, with this you can have the different version of packages as well.
5
51
0
0
When installing a new python package with PIP, can I change the package name because there is another package with the same name? Or, how can I change the existing package's name?
How to install python package with a different name using PIP
0
0.088656
1
0
0
22,776
27,308,836
2014-12-05T04:35:00.000
1
0
0
0
0
python,module,openerp-7,odoo,time-management
0
27,353,088
0
1
0
true
1
0
You can manage this by grouping each employee according to their privilege. For example you have two groups Managerial and employee group so each of them might have different or some how common privilege on certain python objects from OpenERP so please identify those python objects and explore more in Setting >> Users...
1
0
0
0
I have downloaded and installed and also tested via a virtual machine online Odoo 8 and OpenErp 7. I have spent many hours tinkering with the apps and features of both. I am unable to find any way from hours I spend searching or tinkering for a method to change the approve timesheet functionality in the manner I will e...
In using OpenErp 7 or Odoo 8, how do I modify it such that a manager assigned to a project is the one who will approve all timesheet entries for it?
0
1.2
1
0
0
364
27,337,587
2014-12-06T23:03:00.000
0
1
0
1
1
python,linux,boot,raspbian,autostart
0
27,344,131
0
2
0
false
0
0
Try to use bootup option in crontab: @reboot python /path/to/pythonfile.py
1
0
0
0
Can anyone tel me how to start a python script on boot, and then also load the GUI ? I am debian based Raspbian OS. The reason I want to run the python script on boot is because I need to read key board input from a RFID reader. I am currently using raw_input() to read data from the RFID reader. The 11 character hex va...
Starting a python script at boot and loading GUI after that
0
0
1
0
0
1,590
27,358,870
2014-12-08T13:15:00.000
3
0
0
0
0
python,kivy
0
27,380,669
0
3
0
true
0
1
There is no position nor size in a Canvas. Canvas act just as a container for graphics instructions, like Fbo that draw within a Texture, so it have a size. In Kivy, Canvas.size doesn't exists, but i guess you called your widget a canvas. By default, a Widget size is 100, 100. If you put it into a layout, the size will...
1
2
0
0
In my app I need to know how big the canvas is in pixels. Instead calling canvas.size returns [100,100] no matter how many pixels the canvas is wide. Can you please tell me a way to get how many pixels the canvas is wide and high?
Size of canvas in kivy
0
1.2
1
0
0
5,156
27,361,967
2014-12-08T16:06:00.000
-1
0
0
0
0
python,sql-server,spss
0
27,362,970
0
3
0
true
0
0
This isn't as clean as working directly with whatever database is holding the data, but you could do something with an exported data set: There may or may not be a way for you to write and run an export script from inside your Admin panel or whatever. If not, you could write a simple Python script using Selenium WebDri...
3
1
0
0
I'm so sorry for the vague question here, but I'm hoping an SPSS expert will be able to help me out here. We have some surveys that are done via SPSS, from which we extract data for an internal report. Right now the process is very cumbersome and requires going to the SPSS Data Collection Interviewer Server Administrat...
Automating IBM SPSS Data Collection survey export?
0
1.2
1
0
0
1,546
27,361,967
2014-12-08T16:06:00.000
1
0
0
0
0
python,sql-server,spss
0
29,892,280
0
3
0
false
0
0
There are a number of different ways you can accomplish easing this task and even automate it completely. However, if you are not an IBM SPSS Data Collection expert and don't have access to somebody who is or have the time to become one, I'd suggest getting in touch with some of the consultants who offer services on th...
3
1
0
0
I'm so sorry for the vague question here, but I'm hoping an SPSS expert will be able to help me out here. We have some surveys that are done via SPSS, from which we extract data for an internal report. Right now the process is very cumbersome and requires going to the SPSS Data Collection Interviewer Server Administrat...
Automating IBM SPSS Data Collection survey export?
0
0.066568
1
0
0
1,546
27,361,967
2014-12-08T16:06:00.000
2
0
0
0
0
python,sql-server,spss
0
30,706,866
0
3
0
false
0
0
As mentioned by other contributors, there are a few ways to achieve this. The simplest I can suggest is using the DMS (data management script) and windows scheduler. Ideally you should follow below steps. Prerequisite: 1. You should have access to the server running IBM Data collection 2. Basic knowledge of windows t...
3
1
0
0
I'm so sorry for the vague question here, but I'm hoping an SPSS expert will be able to help me out here. We have some surveys that are done via SPSS, from which we extract data for an internal report. Right now the process is very cumbersome and requires going to the SPSS Data Collection Interviewer Server Administrat...
Automating IBM SPSS Data Collection survey export?
0
0.132549
1
0
0
1,546
27,401,918
2014-12-10T13:12:00.000
4
1
0
0
1
python,bluetooth,pebble-watch
0
27,412,126
0
5
0
false
0
0
Apple iDevices do use private resolvable addresses with Bluetooth Low Energy (BLE). They cycle to a different address every ~15 minutes. Only paired devices that have a so called Identity Resolving Key can "decipher" these seemingly random addresses and associate them back to the paired device. So to do something like ...
1
3
0
0
my ultimate goal is to allow my raspberry pi detect when my iphone or pebble watch is nearby. I am presently focusing on the pebble as I believe iphone randomizes the MAC address. I have the static MAC address of the pebble watch. My question is how to detect the presence of the MAC address through bluetooth? I have ...
Detecting presence of particular bluetooth device with MAC address
0
0.158649
1
0
0
15,931
27,403,050
2014-12-10T14:05:00.000
0
0
0
0
0
python,mysql,django,database,data-migration
0
60,700,719
0
4
0
false
1
0
I faced the same issue all what i do to get out this issue just drop all tables in my DB and then run: python manage.py makemigrations and : python manage.py migrate
4
4
0
0
I have a Django project and I did the following: Added a table with some columns Insert some records into the db Added a new column that I didn't realize I needed Made an update to populate that column When I did a migrate everything worked just fine. The new db column was created on the table and the values were po...
Django 1054 - Unknown Column in field list
0
0
1
0
0
8,200
27,403,050
2014-12-10T14:05:00.000
0
0
0
0
0
python,mysql,django,database,data-migration
0
40,621,929
0
4
0
false
1
0
This happened to me because I faked one migration (m1), created another (m2), and then tried to migrate m2 before I had faked my initial migration (m1). So in my case I had to migrate --fake <app name> m1 and then migrate <app name> m2.
4
4
0
0
I have a Django project and I did the following: Added a table with some columns Insert some records into the db Added a new column that I didn't realize I needed Made an update to populate that column When I did a migrate everything worked just fine. The new db column was created on the table and the values were po...
Django 1054 - Unknown Column in field list
0
0
1
0
0
8,200
27,403,050
2014-12-10T14:05:00.000
0
0
0
0
0
python,mysql,django,database,data-migration
0
29,351,981
0
4
0
false
1
0
Unless the new column has a default value defined, the insert statement will expect to add data to that column. Can you move the data load to be after the second migration. (I would have commented, but do not yet have sufficient reputation.)
4
4
0
0
I have a Django project and I did the following: Added a table with some columns Insert some records into the db Added a new column that I didn't realize I needed Made an update to populate that column When I did a migrate everything worked just fine. The new db column was created on the table and the values were po...
Django 1054 - Unknown Column in field list
0
0
1
0
0
8,200
27,403,050
2014-12-10T14:05:00.000
0
0
0
0
0
python,mysql,django,database,data-migration
0
31,042,146
0
4
0
true
1
0
I believe this was because the migration scripts were getting called out of order, due to a problem I had setting them up. Everything is ok now.
4
4
0
0
I have a Django project and I did the following: Added a table with some columns Insert some records into the db Added a new column that I didn't realize I needed Made an update to populate that column When I did a migrate everything worked just fine. The new db column was created on the table and the values were po...
Django 1054 - Unknown Column in field list
0
1.2
1
0
0
8,200
27,416,913
2014-12-11T06:46:00.000
0
0
0
0
0
python,django,crm,zoho
0
27,498,436
0
2
0
false
1
0
All you need is export django auth but if extender user model is there then you can also take extended user model too... Please update your question what Database you are using ?
1
0
0
0
How to track django user details using zoho CRM? I am new zoho CRM, I got the few information and details how ZOHO CRm will be. Now I want to know one thing, I had implement the django project and also have a account in zoho CRM. Now I would like to Tacke all my user details from app database in zoho crm. how to ...
How to track django user details using zoho CRM
0
0
1
0
0
812
27,510,077
2014-12-16T17:08:00.000
2
0
1
0
0
python,self-modifying
0
27,510,374
0
1
0
true
0
0
My first inclination is to say "don't do that". Self-modifying Python (really any language) makes it extremely difficult to maintain a versioned library. You make a bug fix and need to redistribute - how do you merge data you stored via self-modification. Very hard to authenticate packaging using a hash - once the lo...
1
0
0
0
I've considered storing the high scores for my game as variables in the code itself rather than as a text file as I've done so far because it means less additional files are required to run it and that attributing 999999 points becomes harder. However, this would then require me to run self-modifying code to overwrite ...
Self-modifying Python code to keep track of high scores
0
1.2
1
0
0
414
27,517,255
2014-12-17T02:05:00.000
0
0
1
1
1
python,windows,command-line,command
0
27,557,706
0
2
0
false
0
0
Issue resolved. Since no feasible solution was found in 2 days, I decided to wipe all keys containing 'python' from registry as well as some files that were not parts of other programs. This resolved the issue after re-installing python. If anyone finds the true cause of this misbehavior and other - less brutal - solut...
1
1
0
0
I seem to have problem launching python from command line. I tried various things with no success. Problem: When trying to run python from the command line, there is no response i.e. I do not get message about 'command not found' and console does not launch. Only option to open python console is to run C:\Python34\pyth...
Python console not launching properly from command line
0
0
1
0
0
632
27,517,939
2014-12-17T03:40:00.000
1
1
0
1
1
python,c++,protocol-buffers
1
27,687,619
0
1
0
false
0
1
So this is a happy non-answer using my experience. The pure-python bindings for google protobuf are a terrible port of C/C++ stuff. However, I had quite a bit of success wrapping C google protobuf generated bindings using cffi. Someone should go ahead and create a more generic binding, but that would just a short consu...
1
2
0
0
Protobuf with pure python performance 3x slowly on pypy than CPython do. So I try to use c++ implementation for pypy. These are two error (PyFloatObject undefined and const char* to char*) when I compile protobuf(2.6.1 release) c++ implementation for pypy. I compile successfully after I modify python/google/protobuf/py...
Is there any way to use Google Protobuf on pypy?
0
0.197375
1
0
0
567
27,539,852
2014-12-18T05:35:00.000
1
0
1
0
0
python,string,parsing,format,character
0
27,539,969
0
4
0
false
0
0
Do you mean the list method? s='abccda' list(s) # ['a', 'b', 'c', 'c', 'd', 'a']
1
2
0
0
In Python 2.7 how do I parse 'abc' into 'a b c' for a very long string (like 1000 chars)? Or how would I convert 'abccda' to '1 2 3 3 4 1'? (where each unique letter maps to a unique digit, 1-4) I imagine I could pop the chars off, one by one, but I'm new to Python and wonder if there is a simple function that does it.
python parse string into individual chararcters
0
0.049958
1
0
0
116
27,553,319
2014-12-18T18:30:00.000
0
0
0
0
0
python,python-3.x,urllib
0
27,556,712
0
1
0
false
0
0
Now how do I store the last known absolute url to extract the netloc from it and append it to relative url? Should I save the last known absolute URL in a text file? What do you think is wrong with this? Seems to make sense to me... (depending on context, obviously)
1
0
0
0
I am new to Python programming. While making an application, I ran into this problem. I am parsing URL using urllib library of python. I want to convert any relative url into its corresponding absolute url. I get relative and absolute URLs in random fashiion and they may not be from the same domain. Now how do I store...
URL parsing issue in python
1
0
1
0
1
117
27,555,520
2014-12-18T20:55:00.000
1
0
1
0
0
python,class
0
27,555,893
0
2
1
false
0
0
If your program starts assuming big dimensions, yes, you could split your classes or simply your functions according to what they do. Usually functions that do similar tasks or that work on the same data are put together. To import a file containing a set of functions that you defined, if the file is in the same folder...
1
0
0
0
I am wondering if it would be a good idea to use different .py scripts for different parts of a Python program. Like one .py file for a calculator and another for class files and etc. If it is a good idea, is it possible? If possible, where can I find how to do so? I am asking this because I find it confusing to have ...
Is it a good idea to make use different Python scripts for programs?
1
0.099668
1
0
0
545
27,559,330
2014-12-19T03:32:00.000
1
0
1
0
1
python,django,terminal,komodoedit
1
27,559,411
0
1
0
true
1
0
Let's start from the beginning: You are in your project folder eg /home/me/myproject You create a new virtualenv, eg virtualenv /home/me/virtualenvs/myprojectenv You activate the new virtualenv: source /home/me/virtualenvs/myprojectenv/bin/activate ...this means that python and pip commands now point to the versions i...
1
0
0
0
I sincerely apologize for the noobish dribble thats about to come out here: Okay so I am following along with a youtube tutorial using terminal/django/komodo edit to make a simple website. This is my first time really using terminal, I am having issues. I have read up on the terminal and searched this site for my que...
Terminal/django/komodo edit
0
1.2
1
0
0
323
27,584,321
2014-12-20T21:05:00.000
2
0
0
0
0
python,amazon-dynamodb,boto,sample
0
27,599,549
0
2
0
true
0
0
Use Table.scan(max_page_size=1000)
1
2
0
0
I am using amazon dynamodb and accessing it via the python boto query interface. I have a very simple requirement I want to get 1000 entries. But I don't know the primary keys beforehand. I just want to get 1000 entries. How can I do this? ...I know how to use the query_2 but that requires knowing primary keys beforeh...
python dynamodb get 1000 entries
0
1.2
1
0
1
1,903
27,586,108
2014-12-21T02:02:00.000
0
0
0
0
0
python-3.x,tkinter,exe,py2exe
1
29,677,578
0
1
0
false
0
1
As far as I understand there is not a version of py2exe for python3.x You'd be best of going for cx_freeze (Sentdex also has a tutorial on that on that)
1
0
0
0
I have made a small program in Python that involves tkinter, and I made it a pyw file because it has a shortcut on the desktop and I do not want the command prompt to get in the way. I used py2exe following the sentdex tutorial on youtube, and I got an output file, but the output file shows an error and exits before I ...
Python py2exe with tkinter (pyw file)
0
0
1
0
0
216
27,608,053
2014-12-22T18:02:00.000
1
0
0
0
0
python,opencv,image-processing
0
27,689,079
0
1
0
true
0
0
There is a standard Python functionimghdr.what. It rulez! ^__^
1
1
1
0
I read an image (of unknown format, most frequent are PNGs or JPGs) from a buffer. I can decode it with cv2.imdecode, I can even check if it is valid (imdecode returns non-None). But how can I reveal the image type (PNG, JPG, something else) of the buffer I've just read?
OpenCV: how to get image format if reading from buffer?
0
1.2
1
0
0
2,355
27,628,753
2014-12-23T22:10:00.000
1
0
0
0
1
python,network-programming,client-server,port,server
0
27,628,809
0
3
0
false
0
0
In order to do that the server must listen on a certain port(s). This means the client(s) will need to interact on these ports with it. So... no it is impossible to do that on some random unknown port.
3
1
0
0
I'm trying to build a simple python server that a client can connect to without the client having to know the exact portnumber. Is that even possible? The thought is to choose a random portnumber and using it for clients to connect. I know you could use bind(host, 0) to get a random port number and socket.getsockname(...
How to give a python client a port number from a python server
0
0.066568
1
0
1
689
27,628,753
2014-12-23T22:10:00.000
0
0
0
0
1
python,network-programming,client-server,port,server
0
27,630,673
0
3
0
false
0
0
Take a look at Zeroconf, it seems to be the path to where you are trying to get to.
3
1
0
0
I'm trying to build a simple python server that a client can connect to without the client having to know the exact portnumber. Is that even possible? The thought is to choose a random portnumber and using it for clients to connect. I know you could use bind(host, 0) to get a random port number and socket.getsockname(...
How to give a python client a port number from a python server
0
0
1
0
1
689
27,628,753
2014-12-23T22:10:00.000
0
0
0
0
1
python,network-programming,client-server,port,server
0
27,628,855
0
3
0
false
0
0
You need to advertise the port number somehow. Although DNS doesn't do that (well, you could probably cook up some resource record on the server object, but that's not really done) there are many network services that do. LDAP like active directory (you need write rights), DNS-SD dns service discovery, universal plug a...
3
1
0
0
I'm trying to build a simple python server that a client can connect to without the client having to know the exact portnumber. Is that even possible? The thought is to choose a random portnumber and using it for clients to connect. I know you could use bind(host, 0) to get a random port number and socket.getsockname(...
How to give a python client a port number from a python server
0
0
1
0
1
689
27,629,227
2014-12-23T22:57:00.000
-1
0
0
0
0
python,scipy,least-squares,intel-mkl
0
45,621,086
0
1
0
false
0
0
You could try Intel's python distribution. It includes a pre-built scipy optimized with MKL.
1
6
1
0
I'm doing a Monte Carlo simulation in Python in which I obtain a set of intensities at certain 2D coordinates and then fit a 2D Gaussian to them. I'm using the scipy.optimize.leastsq function and it all seems to work well except for the following error: Intel MKL ERROR: Parameter 6 was incorrect on entry to DGELSD. Th...
Intel MKL Error with Gaussian Fitting in Python?
1
-0.197375
1
0
0
860
27,641,616
2014-12-24T19:51:00.000
1
1
0
0
0
python,database,numpy,dataset,storage
0
27,641,772
0
1
1
true
0
0
Reading 500 files in python should not take much time, as the overall file size is around few MB. Your data-structure is plain and simple in your file chunks, it ll not even take much time to parse I guess. Is the actual slowness is bcoz of opening and closing file, then there may be OS related issue (it may have very...
1
0
1
0
I've accumulated a set of 500 or so files, each of which has an array and header that stores metadata. Something like: 2,.25,.9,26 #<-- header, which is actually cryptic metadata 1.7331,0 1.7163,0 1.7042,0 1.6951,0 1.6881,0 1.6825,0 1.678,0 1.6743,0 1.6713,0 I'd like to read these arrays into memory selectively. W...
Better way to store a set of files with arrays?
0
1.2
1
0
0
66
27,645,172
2014-12-25T07:32:00.000
0
1
0
0
0
python,nginx,uwsgi
1
27,646,090
0
1
0
false
1
0
The limit here is nginx. It cannot avoid (unless when in websockets mode) buffering the input. You may have more luck with apache or the uWSGI http router (albeit i suppose they are not a viable choice)
1
0
0
0
I have an api with publishers + subscribers and I want to stop a publisher from uploading a lot of data if there are no subscribers. In an effort to avoid another RTT I want to parse the HTTP header, see if there are any subscribers and if not return an HTTP error before the publisher finishes sending all of the data. ...
Can uWSGI return a response before the POST data is uploaded?
1
0
1
0
1
244
27,682,975
2014-12-29T03:17:00.000
3
0
0
0
0
python,web-scraping
0
27,683,149
0
1
0
true
0
0
The infinite scroll is probably using an Ajax query to retrieve more data as you scroll. Use your browser's dev tools to inspect the request structure and try to hit the same endpoint directly. In this way you can get the data you need, often in json or xml format. In chrome open the dev tools (Ctrl + shift + I in wi...
1
0
0
0
I am trying to use python to scrape a website implemented with infinite scroll. Actually, the web is pinterest. I know how to use selenium webdriver to scrape a web with infinite scroll. However, the webdriver basically imitates the process of visiting the web and is slow, much slower than using BeautifulSoup and urlli...
Is there any fast ways to scrape a website with infinite scroll?
0
1.2
1
0
1
3,050
27,690,388
2014-12-29T14:06:00.000
0
0
1
0
0
python,powershell
0
27,753,819
0
1
0
true
0
0
According to Lukas Graf: Replace source with . (a single dot) and the relative path after it with a full, absolute path
1
1
0
0
I want to activate this virtual environment: (G:/virt_env/virt1) I'm just following a virtualenv tutorial, I have created a virtual environment(look above), the next step Is activating It, but that tutorial was written for Unix, So how do I activate this virtual environment using Powershell 2? This is assuming basic kn...
How do I activate a virtual environment in Powershell 2?
0
1.2
1
0
0
522
27,714,535
2014-12-31T00:22:00.000
3
0
0
0
0
python,opencv,pixel,integral
0
27,717,883
0
2
0
false
0
0
sumElems function in OpenCV will help you to find out the sum of the pixels of the whole of the image in python. If you want to find only the sum of a particular portion of an image, you will have to select the ROI of the image on the sum is to be calculated. As a side note, if you had found out the integral image, the...
2
2
1
0
I have an image and want to find the sum of a part of it and then compared to a threshold. I have a rectangle drawn on the image and this is the area I need to apply the sum. I know the cv2.integral function, but this gives me a matrix as a result. Do you have any suggestion?
how to do the sum of pixels with Python and OpenCV
0
0.291313
1
0
0
17,785
27,714,535
2014-12-31T00:22:00.000
5
0
0
0
0
python,opencv,pixel,integral
0
27,738,842
0
2
0
false
0
0
np.sum(img[y1:y2, x1:x2, c1:c2]) Where c1 and c2 are the channels.
2
2
1
0
I have an image and want to find the sum of a part of it and then compared to a threshold. I have a rectangle drawn on the image and this is the area I need to apply the sum. I know the cv2.integral function, but this gives me a matrix as a result. Do you have any suggestion?
how to do the sum of pixels with Python and OpenCV
0
0.462117
1
0
0
17,785
27,716,752
2014-12-31T05:50:00.000
1
0
1
0
0
python,string,list,comparison,overlapping
0
27,716,829
0
3
0
false
0
0
all possible list combinations to string, and avoiding overlaping elements Is a combination one or more complete items in its exact, current order in the list that match a pattern or subpattern of the string? I believe one of the requirements is to not rearrange the items in the list (ab doesn't get substituted for...
1
0
0
0
I want to know how to compare a string to a list. For example I have string 'abcdab' and a list ['ab','bcd','da']. Is there any way to compare all possible list combinations to the string, and avoid overlaping elements. so that output will be a list of tuples like [('ab','da'),('bcd'),('bcd','ab'),('ab','ab'),('ab'),...
Python: comparing list to a string
1
0.066568
1
0
0
567
27,719,695
2014-12-31T10:20:00.000
0
1
0
1
0
python,encryption,https
0
27,719,872
0
2
0
true
0
0
if you have no problem rolling out a key file to all nodes ... simply throw your messages into AES, and move the output like you moved the unencrypted messages ... on the other side ... decrypt, and handle the plaintext like the messages you handled before ...
1
0
0
0
I want to create a python program that can communicate with another python program running on another machine. They should communicate via network. For me, it's super simple using BasicHTTPServer. I just have to direct my message to http:// server2 : port /my/message and server2 can do whatever action needed based on t...
Python network communication with encryption and password protection
0
1.2
1
0
0
595
27,724,624
2014-12-31T17:57:00.000
2
0
0
0
0
python,django,apache
0
27,725,014
0
1
0
true
1
0
Thats the nature of using it in that format/setup. On development, running as 'manage.py runserver' it auto reloads on file changes. production/proxy setups like you have, you need to reload/restart the service to have changes take effect.
1
0
0
0
I am testing a web application on both shared host and Apache localhost, using Django and fastcgi. When I edited my code and refreshing the page, many times the new code does not take effect. I think this is a cache issue, but I don't know how from the application. For example: adding new url pattern to mysite/urls.py...
How to cancel Django cache in fastcgi
0
1.2
1
0
0
47
27,743,031
2015-01-02T13:31:00.000
0
0
0
0
0
python,mysql,pymysql
0
27,743,210
0
2
0
false
0
0
This happens to be one of the reasons desktop client-server architecture gave way to web architecture. Once a desktop user has access to a dbms, they don't have to use just the SQL in your application. They can do whatever their privileges allow. In those bad old days, client-server apps only could change rows in the D...
1
1
0
0
I have a Python client program (which will be available to a limited number of users) that fetches data from a remote MySQL-DB using the pymysql-Module. The problem is that the login data for the DB is visible for everyone who takes a look at the code, so everyone could manipulate or delete data in the DB. Even if I wo...
Secure MySQL login data in a Python client program
0
0
1
1
0
934
27,761,448
2015-01-04T01:27:00.000
1
0
0
0
0
python,tile,tmx,tiled,cocos2d-python
0
27,761,506
0
1
0
false
0
1
All I had to do was cell.tile.image = image
1
0
0
0
-I'm using python and cocos2D I have the file loading a tmx-map but now I want to change a specific tile to display an image from another file, I have saved the specific tile that I want to change in a variable but changing it I don't know how. Thanks in advance
python cocos2d change tile's image
0
0.197375
1
0
0
266
27,761,684
2015-01-04T02:11:00.000
0
1
1
0
0
python,mysql,ruby,json,mongodb
0
27,761,882
0
1
1
false
1
0
I think this all boils down to what the most important needs are for the project. These are some of the questions I would try to answer before selecting the technology: Will I need to access records individually after inserting into the database? Will I ever need to aggregate the data when reading it (for reporting, f...
1
0
0
0
Im trying to design a system that can periodic "download" a large amount of data from an outside api.. This user could have around 600,000 records of data that I need once, then to check back every hour or so to reconcile both datasets. Im thinking about doing this in python or ruby in background tasks eventually but I...
Best Way to Store Large Amount of Outside API Data... using Ruby or Python
1
0
1
0
0
149
27,799,692
2015-01-06T13:28:00.000
0
0
0
0
0
python,zip,epub,epub3
1
28,436,076
0
2
0
true
1
0
The solution I've found: delete the previous mimetype file when creating the new archive create an new mimetype file before adding anything else : zipFile.writestr("mimetype", "application/epub+zip") Why does it work : the mimetype is the same for all epub : "application/epub+zip", no need to use the original file.
1
0
0
0
I'm working on a script to create epub from html files, but when I check my epub I have the following error : Mimetype entry missing or not the first in archive The Mimetype is present, but it's not the first file in the epub. Any idea how to put it in first place in any case using Python ?
epub3 : how to add the mimetype at first in archive
0
1.2
1
0
1
1,098
27,810,571
2015-01-07T02:30:00.000
1
0
1
0
0
python,loops
0
27,810,605
0
2
0
false
0
0
Check out the module matplotlib, it was made to give plotting visuals in python. I hope this helps a little.
1
0
0
0
I am a beginner so I don't think I need to use anything complicated. Basically I have to print y=x^+3 for the rangex=0 to x=4 using formatted output and I don't know how. From what I have learned so far, I'm supposed to use formatted output, looping and variable width output to do this. Does anyone know how to do it? T...
How to formatted output a graph of an equation using python?
0
0.099668
1
0
0
102
27,813,209
2015-01-07T05:52:00.000
0
0
1
0
0
python,intellij-idea
0
27,828,457
0
1
0
true
0
1
Normally the binary modules for a Python interpreter are rescanned on IntelliJ IDEA restart. Please try restarting the IDE.
1
0
0
0
community! My problem: I have an item, namely gi.repository.Gtk, marked as "Unresolved reference: Gtk". The Gtk module did not exist at the moment of setting up Python SDK in Idea, however I've installed it little bit later. I can't get how do I force re-sync of classpath for python?
intellij: update classes in classpath for python plug-in
0
1.2
1
0
0
93
27,834,570
2015-01-08T06:57:00.000
0
0
0
0
0
python,django,environment-variables
1
28,414,823
0
1
0
true
1
0
well, it turned out that the AppConfig is not the right spot for a task like that .. i realized my loading of secrets with a modification of the projects manage.py and im planning to release an app with all of the code in the near furture :)
1
0
0
0
Id like to have my secret keys loaded via environment vars that shall be check on startup of my Django app. Im using an AppConfig for that purpose, because that code will be executed on startup. For now i wrote a little helper to get the vars and a list of vars to check. Which is working fine. The problem: I also wrot...
How To check for environment vars during django startup
0
1.2
1
0
0
170
27,870,003
2015-01-09T22:05:00.000
0
0
1
1
0
python,pip,sudo,osx-yosemite
0
57,711,516
0
5
0
false
0
0
If you altered your $PATH variable that could also cause the problem. If you think that might be the issue, check your ~/.bash_profile or ~/.bashrc
2
156
0
0
While installing pip and python I have ran into a that says: The directory '/Users/Parthenon/Library/Logs/pi' or its parent directory is not owned by the current user and the debug log has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want the -H flag. be...
pip install: Please check the permissions and owner of that directory
0
0
1
0
0
189,575
27,870,003
2015-01-09T22:05:00.000
61
0
1
1
0
python,pip,sudo,osx-yosemite
0
39,810,683
0
5
0
false
0
0
pip install --user <package name> (no sudo needed) worked for me for a very similar problem.
2
156
0
0
While installing pip and python I have ran into a that says: The directory '/Users/Parthenon/Library/Logs/pi' or its parent directory is not owned by the current user and the debug log has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want the -H flag. be...
pip install: Please check the permissions and owner of that directory
0
1
1
0
0
189,575
27,885,666
2015-01-11T09:36:00.000
1
0
1
1
0
python,virtualenv,virtualenvwrapper
0
27,885,868
1
1
0
false
0
0
When creating virtual environment, you can specify which python to use. For example, virtualenv -p/usr/bin/python2.7 env Same for mkvirtualenv
1
0
0
0
using autoenv and virtualenvwrapper in python and trying to configure in it the specific python version. the autoenv file (called .env) contains (simply) echo 'my_env' is there a way to configure it's python version?
how to setup virtualenv to use a different python version in each virtual env
1
0.197375
1
0
0
572
27,912,757
2015-01-12T23:49:00.000
0
1
1
0
0
python,c++,c,binary
0
27,912,842
0
2
0
true
0
0
The tab is represented in the ASCII chart as 0x08 0x09, or "00001000" "00001001" in a binary string. The Enter key is different because it could represent CR (carriage return), LF (Linefeed), or both. The CR is represented as 0x0d, or "00001101" as binary string. The LF is represented as 0x0A, or "00001010" as bina...
1
0
0
0
I'm trying to make a python program that converts text to one long binary string. The usual line of test and sentences are easy enough to convert into binary but I'm having trouble with the whitespace. How do I put in a binary byte to represent the enter key? Do I just put in the '/' and an 'n' strings? I would ide...
text - binary conversion
0
1.2
1
0
0
310
27,929,197
2015-01-13T18:42:00.000
0
0
0
0
0
python,mysql,encoding,urllib
0
27,931,174
0
1
0
false
0
0
Yes it is an encoding issue, make sure sure when you parse your data it doesn't encrypt it or turn it into byte encoded format. Those characters means your computer can't read the data that is being stored, so it isn't being stored in a data type that we can read.
1
0
0
0
I am using urllib in python 2.7 to retrieve webpages from the internet. After parsing the data and storing it on the database, i get the following symbols – and †and — and so on. I wanted to know how these symbols are generated and how to get rid of it? Is it an encoding issue?
MySQL - Strange symbols while using urllib in Python
0
0
1
0
0
55
27,952,331
2015-01-14T20:59:00.000
92
0
1
0
0
python,pycharm
0
27,952,376
0
3
0
true
0
0
Menu: Run -> Edit configurations -> "+" (add new config) -> Python. Script name: program.py If you need to debug a script from installed packages, such as tox, you can specify the full path too. For example: Script name: /home/your_user/.envs/env_name/bin/tox Above /home/your_user/.envs/env_name is a path to virtual en...
2
63
0
0
I have been using PyCharm for a bit so I am not an expert. How I normally ran my programs was with the terminal like so: program.py -t input1 -t1 input2 I was wondering how can I debug this? For other programs I wrote, I did not have any arguments so debugging was simply setting break points and pressing debug.
Debugging with PyCharm terminal arguments
0
1.2
1
0
0
43,698
27,952,331
2015-01-14T20:59:00.000
1
0
1
0
0
python,pycharm
0
51,116,540
0
3
0
false
0
0
It was almost correct but just needed little correction with full script path. Menu: Run->Edit configurations->"+" (add new config)->Python. Script name: path + /program.py Script params: -t input1 -t1 input2
2
63
0
0
I have been using PyCharm for a bit so I am not an expert. How I normally ran my programs was with the terminal like so: program.py -t input1 -t1 input2 I was wondering how can I debug this? For other programs I wrote, I did not have any arguments so debugging was simply setting break points and pressing debug.
Debugging with PyCharm terminal arguments
0
0.066568
1
0
0
43,698
27,955,622
2015-01-15T01:51:00.000
0
0
0
0
0
java,python,processbuilder,inter-process-communicat
0
27,969,431
0
1
0
false
1
0
From your scenario, you are looking for inter process communication. You can achieve this using shared file. Your python script will write the output in text file, and your java program will read the same file.
1
1
0
0
Good evening all, am running a python script inside java using processBuilder. the python script returns a list and i dont know how to get it java and use it since all i can do for the moment with process builder is print errors or outputs. is it possible to get the list in java as well. Many thanks
Java/python using processBuilder
1
0
1
0
0
266
27,972,459
2015-01-15T20:32:00.000
2
0
0
0
0
python,rest,paypal
0
27,989,541
0
1
0
false
1
0
Got a reply from PayPal support. Apparently you can take the same token you pass to BillingAgreement.execute() and pass it to GetExpressCheckoutDetails in their classic API. I tried it and it works. It means you have to use both APIs (which we weren't planning to do) and store both API auth info, which is annoying. ...
1
1
0
0
Let's say I have a billing agreement, which I just executed on the callback from the PayPal site: resource = BillingAgreement.execute(token) The resource returned does not have any payer information (name, email, etc). I can use the ID to load the full BillingAgreement: billing_agreement = BillingAgreement.find(res...
In the PayPal REST API, how can I get payer information from a newly executed BillingAgreement?
0
0.379949
1
0
1
555
27,978,383
2015-01-16T06:25:00.000
5
1
0
0
0
python
0
27,978,545
0
2
0
false
0
0
Even if you did this, I'd strongly discourage it. Root can access pretty much everyone's home directory, but the nuances of adding programs to the PATH that the root user doesn't technically own can be detrimental at best - might lead to a few root services not working properly, and actively insecure at worst. There's...
1
7
0
0
How to use pyenv with another user? For example, If I have installed pyenv in user test's environment, I could use pyenv when i login as test. However, how could i use pyenv when I login as another user, such as root?
How to use pyenv with another user?
0
0.462117
1
0
0
3,900
28,009,390
2015-01-18T11:56:00.000
6
0
0
0
0
python,python-2.7
0
28,009,442
0
4
0
false
0
0
This question is rather subjective to the definition of random, and the distribution you wish to replicate. The simplest solution: Choose a one random number, rand1 : [30,296] Choose a second random number, rand2 : [30, (326-Rand1)] Then the third cannot be random due to the constraint so calc via 356-(rand1+rand2)
1
0
1
0
please how can I randomly select 3 numbers whose sum is 356 and each of these 3 is more than 30? So output should be for example [100, 34, 222] (but not [1,5,350]) I would like to use random module to do this. thank you!
randomly select 3 numbers whose sum is 356 and each of these 3 is more than 30
0
1
1
0
0
131
28,017,037
2015-01-19T02:11:00.000
6
0
1
0
0
python,heap
0
28,017,065
0
2
0
false
0
0
You can't. Or rather, you can't specify it as a lambda. You can however make a heap of tuples, heapq.heappush(Q, (key(v), v)) and heapq.heappop(Q)[1].
1
2
0
0
In python heapq if you are putting in objects, how can u use a lambda to specify its key? Like heapq.heappush(Q, v, key=lambda x: f(x)). Thanks
How to use lambdas in python heapq?
0
1
1
0
0
5,551
28,024,191
2015-01-19T12:00:00.000
0
0
0
0
0
python,machine-learning,scikit-learn
0
28,024,414
0
1
0
false
0
0
(My answer is based on the usage of svm.SVC, Lasso may be different.) I think that you are supposed pass the Gram matrix instead of X to the fit method. Also, the Gram matrix has shape (n_samples, n_samples) so it should also be too large for memory in your case, right?
1
4
1
0
I'm trying to train a linear model on a very large dataset. The feature space is small but there are too many samples to hold in memory. I'm calculating the Gram matrix on-the-fly and trying to pass it as an argument to sklearn Lasso (or other algorithms) but, when I call fit, it needs the actual X and y matrices. A...
Using precomputed Gram matrix in sklearn linear models (Lasso, Lars, etc)
0
0
1
0
0
1,183
28,024,651
2015-01-19T12:26:00.000
0
0
0
0
0
python,django,login,navigation
0
28,024,750
0
2
0
false
1
0
1: create your own view that the login button take the person to when clicked and load your index.html template. you do not have to use the built in login. 2: logo? you can use any logo/format you want. Django doesn't come with a template that creates the look of the site (beside the admin one); so you need to create ...
2
0
0
0
Im using the Django template login and want to navigate from the login to my own written index.html file. so if a user push the "login" button the result page is my index file. My second question is how to use logos in django python and what structure i need in my project. best regards
Django Navigation from Template-Login to a self written index.html
1
0
1
0
0
85
28,024,651
2015-01-19T12:26:00.000
0
0
0
0
0
python,django,login,navigation
0
28,028,387
0
2
0
false
1
0
create custom log-in and registration in your project, and write the custom back-end if you have more user ,if request is came from user to log-in then redirect to index,html,
2
0
0
0
Im using the Django template login and want to navigate from the login to my own written index.html file. so if a user push the "login" button the result page is my index file. My second question is how to use logos in django python and what structure i need in my project. best regards
Django Navigation from Template-Login to a self written index.html
1
0
1
0
0
85
28,057,552
2015-01-21T00:14:00.000
0
0
0
0
0
python,sockets,buffer,recv
0
28,057,641
0
2
0
false
0
0
Learn about OSI layers, and different connections such as TCP and UDP. socket.send implements a TCP transmission of data. If you look into the OSI layers, you will find out that the 4th layer (i.e. transport layer) will buffer the data to be transmitted. The default size of the buffer depends on the implementation.
2
0
0
0
I'm trying to learn how socket module works and I have a dumb question: Where is socket.send()'s sent data stored before being cleared by socket.recv()?. I believe there must be a buffer somewhere in the middle awaiting for socket.recv() calls to pull this data out. I just made a test with a server which sent a lot of...
Trying to understand buffering in Python socket module
0
0
1
0
1
184
28,057,552
2015-01-21T00:14:00.000
0
0
0
0
0
python,sockets,buffer,recv
0
28,057,652
0
2
0
true
0
0
The OS (kernel) buffers the data. On Linux the buffer size parameters may be accessed through the /proc interface. See man 7 socket for more details (towards the end.)
2
0
0
0
I'm trying to learn how socket module works and I have a dumb question: Where is socket.send()'s sent data stored before being cleared by socket.recv()?. I believe there must be a buffer somewhere in the middle awaiting for socket.recv() calls to pull this data out. I just made a test with a server which sent a lot of...
Trying to understand buffering in Python socket module
0
1.2
1
0
1
184
28,063,378
2015-01-21T09:14:00.000
1
0
0
0
0
python,macos,apache,ampps
0
28,284,966
0
1
0
true
1
0
As far as I can tell, AMPPS does not work on Yosemite at all (@ v2.8)
1
0
0
0
I am have just recently acquired a new Mac (Yosemite OSX 10.10) I am reconfiguring everything and I need to work with external configs and Python on some new projects. Which bring me to two additional question: how to include an extra configuration with an external config file ? can I just include it to the httpd.con...
AMPPS Yosemite Python configuration
0
1.2
1
0
0
259
28,069,439
2015-01-21T14:19:00.000
7
0
0
0
0
python,mysql,openerp-7,odoo
0
28,069,999
0
1
0
true
1
0
You can't: the Odoo ORM does not support null numeric values. If you really need to distinguish an "empty" value from a zero value, you need a workaround: either use a string field (simpler, but needs additional checks to allow only number and it's harder to perform calculations) or use a second boolean field to mark e...
1
8
0
0
In Odoo/OpenERP 7, I have a nullable numeric column called balance 'balance': fields.float(string='Balance',digits=(20,2)) I am trying to use Python code to update None into the field self.write(cr, uid, [1], { 'balance':None }) but, rather frustratingly, Python treats None the same as 0 so I end up with 0 in the D...
Odoo - Write null to numeric column
0
1.2
1
0
0
4,136
28,076,316
2015-01-21T20:34:00.000
2
0
0
0
0
python,django,scheduled-tasks,celery,django-celery
0
28,076,369
0
2
0
false
1
0
Use a simple cron job to trigger a custom Django management command.
2
0
0
0
Some tuples in my database need to be erased after a given time. I need my django app to check if the rows have expired. While I can definitely write the function, how do I make Django run at everyday at a fixed time? I have heard about Task Queues like Celery. Are they too much powerful for this? Is their anything sim...
How do I make my django application perform a job at a fixed time everyday?
0
0.197375
1
0
0
140
28,076,316
2015-01-21T20:34:00.000
-1
0
0
0
0
python,django,scheduled-tasks,celery,django-celery
0
28,076,358
0
2
0
false
1
0
Use a threading.Thread to schedule a continuous event loop. In your thread, use time.sleep to create a gap before the next occurrence of the event.
2
0
0
0
Some tuples in my database need to be erased after a given time. I need my django app to check if the rows have expired. While I can definitely write the function, how do I make Django run at everyday at a fixed time? I have heard about Task Queues like Celery. Are they too much powerful for this? Is their anything sim...
How do I make my django application perform a job at a fixed time everyday?
0
-0.099668
1
0
0
140
28,101,995
2015-01-23T02:12:00.000
2
0
0
1
0
python,bash,hadoop,mapreduce,apache-spark
0
28,112,455
0
1
0
false
0
0
The main idea why Hadoop Streaming is considered to be slow is that for both mapper and reducer you have to pass arguments via stdin, which means you have to serialize them as a text, and to get the output of both mapper and reducer you have to deserialize them from the text back to Java structures, which usually consu...
1
0
0
0
I have heard from several articles that Hadoop streaming with bash is significantly slower than a compiled code or python. Is this only true for sort commands and the like? My script needs to -copy file to node -on node execute a commercial program with file as argument -pass output back to folder My intuition is tell...
Hadoop streaming with Bash - how slow?
0
0.379949
1
0
0
481
28,106,854
2015-01-23T09:36:00.000
2
0
0
0
0
python,django,function,session
0
28,107,498
0
1
0
true
1
0
You can't. This question betrays a fundamental misunderstanding of how both sessions and web applications work. Web code is stateless; there is nothing "running" for any user in between the requests that user makes. If a user doesn't make any requests for longer than the session timeout, the only time the server code k...
1
0
0
0
So i'm using the request.session.set_expiry(NUMBER_OF_SECONDS) in order to check if the user of my webpage has been inactive for a number of seconds and clossing the session when it happens. The problem is that i want to call a function for doing some things jsut before the session expires and i don't know how can I do...
Django: calling a function before session expires
0
1.2
1
0
0
312
28,108,106
2015-01-23T10:43:00.000
2
0
1
0
0
python,64-bit,32-bit,anaconda,pythonxy
1
28,198,803
0
1
1
true
0
0
You'll need to reinstall everything for the 64-bit Python, but note that Anaconda and conda may already come with everything that you need.
1
2
0
0
I have some doubts about how to do that, I hope anybody can point me in the correct direction. My current situation is that I am working with the python package Python(x,y) 32 bits in a Windows machine with 64 bits. And, as many of you know, I am having some problems with the Memory error. So that I am thinking about c...
from python 32 bits to python 64 bits
0
1.2
1
0
0
5,321
28,124,450
2015-01-24T10:20:00.000
2
0
0
0
0
python,python-2.7
0
28,124,506
0
1
0
true
0
0
What you could do is choose a min/max interval of how long you want to wait. Keep a note of how many requests have been made in the last 60 minutes and if you're still below the quota, download a document and wait for rand(min, max). This is not very fancy and doesn't distribute the wait times across the whole 60 minut...
1
0
0
0
I am using an API that returns me articles in my language in determined categories. This API limits me in 100 calls for each interval of 60 minutes. I don't want to make 100 calls straight away and make my script wait until 60 minutes has passed. I could then shoot an API call every 36 seconds, but I also don't want th...
How can I distribute 100 API calls randomly in a 60 minutes time interval?
1
1.2
1
0
1
303
28,127,310
2015-01-24T16:00:00.000
2
0
1
0
0
python,python-3.x
0
28,127,456
0
3
0
false
0
0
On windows, you can quit the interpreter with CTRL-z and on linux/mac you can quit with CTRL-D. If you type exit, it will tell you exactly what to do. If you are not running interactively (i.e. by running python your_script.py) the code will just end when it's reached the bottom of the file. If you actually do need to...
1
2
0
0
I have made a number guessing game and once you have guessed the number it will say well done but idle stays open, how do I get it to close?
how do I get my program to close once finished in python
0
0.132549
1
0
0
4,071
28,127,730
2015-01-24T16:40:00.000
3
0
1
0
0
python,pygame,pip,python-3.4
0
28,127,786
0
9
0
false
0
1
14 y/o? Good for you! You can put the file into your python/scripts folder and run pip install *file* (where *file* is your filename).
1
9
0
0
So I have this little problem. When I try to install PyGame for Python 3.4 I download a .whl (wheel?) file and don't know how to use it. Some guys told me something about pip but don't know how to use/install it.
How to install PyGame on Python 3.4?
0
0.066568
1
0
0
64,844
28,136,063
2015-01-25T11:52:00.000
1
0
0
0
0
ajax,python-3.x,cookies,xmlhttprequest,bottle
0
28,137,747
0
2
0
false
1
0
I tried to set_cookies('test', 123, secret='mysecret') under AJAX request, it worked, but still couldn't find previous cookies. Then I remarked that my previous cookies, called cook1 and cook2, written under 'normal' http request, if they had same domain, had different 'path' (under Chrome ressource explorer). They w...
1
1
0
0
I use bottle set/get cookie mecanism to track my user_id (with 'secret' param when calling set/get_cookie() During normal http(s) request everything is fine but when making a xhr request (same domain)user_id = request.get_cookie('user_id', secret='mysecret') returns None. When checking on client browser, cookie and key...
Bottle, how to get_cookie during AJAX request (same domain)
0
0.099668
1
0
0
167
28,139,507
2015-01-25T17:50:00.000
0
0
1
0
0
ipython
0
34,588,036
0
2
0
false
0
0
You can output your history with the commands %history -f filename history with lines and sessions %history -g -f filename
1
3
0
0
I use vim with a couple of plugins as a python ide. Along with an open vim session, I run an ipython session in a split console. I've found their combination is a great productivity tool for programming data analysis scripts. What I'm missing is a way to show all current session history in a side panel, so that I coul...
Where does ipython store the current session history?
0
0
1
0
0
851
28,159,111
2015-01-26T21:30:00.000
0
0
1
0
1
python,django
1
28,159,200
0
1
0
true
1
0
Make sure your wsgi file points to the right virtualenv!
1
0
0
0
I installed a django-secure into a virtualenv using pip. The install was normal. The module shows up in the virtualenv pip list and in virtualenvs/dev/lib/python2.7/site-packages. I get the following error when running my code. ImportError: No module named djangosecure The folder is in there and there is an init. N...
Virtualenv installed package not found
0
1.2
1
0
0
196
28,161,508
2015-01-27T00:53:00.000
0
0
1
1
0
python,gitpython
1
28,179,875
0
1
0
false
0
0
You might not have git.ext in your PATH, but that can easily be tested by executing it yourself. If you see an error, you can either add it to the PATH, or set the GIT_PYTHON_GIT_EXECUTABLEto the executable git-python should execute for git commandline services.
1
0
0
0
I am facing an issue while cloning a git repo. I am using function clone_from from GitPython library from git import Repo Repo.clone_from("git://github.com/facebook/buck.git", "D:\sample") I am getting error WindowsError: The system cannot find the file specified Can someone please tell me if this is how to clone a...
GitPython - clone_from not working
1
0
1
0
0
1,005
28,162,229
2015-01-27T02:26:00.000
0
1
0
1
1
python,linux,bash,ssh
0
28,223,316
0
2
0
true
0
0
The solution to my problem is to use PATH=/cygdrive/c/WINDOWS/system32:/bin cmd /c in front of the script call, sth like: ssh user@host "PATH=/cygdrive/c/WINDOWS/system32:/bin cmd /c script" .This will run the script using in Windows env. In my case the problem was that the script was run under cygwin env and I wanted ...
1
1
0
0
I know I can find multiple answers to this question but I have a problem with the result. I have a Windows PC with a script on it and a Linux PC that has to start the script using ssh. The problem I am seeing is that for some reason it's using the Linux environment to run the script and not the Windows env. Is this exp...
How to execute a remote script using ssh
1
1.2
1
0
0
865
28,173,716
2015-01-27T15:12:00.000
0
0
1
0
0
python-multithreading
0
28,207,425
0
1
0
true
0
0
How about you create a list of 101 elements, 0 through 100. Then store the output from processing file x into list element x. When all processing is complete, write the data in the list elements from 0 to 100 to the file.
1
0
0
0
I am using Python threading to process multiple files and I want output of each of the files 0 through 100 being processed to be written in a file in orderly fashion Currently I am saving output of all the thread as they get executed and hence the order is not maintained. How can I achieve this?
Python threading how get output of multiprocess in sequence
0
1.2
1
0
0
109
28,174,487
2015-01-27T15:50:00.000
3
0
0
0
0
python,sockets,ethernet
0
28,174,528
0
1
0
false
0
0
Unplug one and if it stops working - you found the right one. If it does not stop working it is the other one.
1
1
0
0
I have an embedded system connected with an ethernet port to one of my 2 ethernet interfaces, but I have the problem that my python code for the socket connection does not know where to connect to the embedded. I mean, sometimes I get the connection and sometimes I just don't (and I have to change the cable to the othe...
I have 2 ethernet interfaces on the same PC, how to know which interface is connected in python?
0
0.53705
1
0
1
172
28,183,527
2015-01-28T02:18:00.000
0
1
0
0
0
python,email,gmail
0
28,184,142
0
2
0
false
0
0
Unfortunately the categories are not exposed to IMAP. You can work around that by using filters in Gmail to apply normal user labels. (Filter on, e.g., category:social.)
2
0
0
0
I am trying to extract mails from gmail using python. I noticed that I can get mails from "[Gmail]/All Mail", "[Gmail]/Drafts","[Gmail]/Spam" and so on. However, is there any method to retrieve mails that are labeled with "Primary", "Social", "Promotions" etc.? These tags are under the "categories" label, and I don't k...
How to extract mail in "categories" label in gmail?
1
0
1
0
1
596
28,183,527
2015-01-28T02:18:00.000
0
1
0
0
0
python,email,gmail
0
28,218,594
0
2
0
false
0
0
Yes, categories are not available in IMAP. However, rather than filters, I found that gmail api is more favorable for me to get mail by category.
2
0
0
0
I am trying to extract mails from gmail using python. I noticed that I can get mails from "[Gmail]/All Mail", "[Gmail]/Drafts","[Gmail]/Spam" and so on. However, is there any method to retrieve mails that are labeled with "Primary", "Social", "Promotions" etc.? These tags are under the "categories" label, and I don't k...
How to extract mail in "categories" label in gmail?
1
0
1
0
1
596
28,187,233
2015-01-28T07:56:00.000
2
0
0
0
1
python,matlab,curve-fitting,least-squares,surface
0
28,189,659
0
2
0
false
0
0
Dont use any toolboxes, GUIs or special functions for this problem. Your problem is very common and the equation you provided may be solved in a very straight-forward manner. The solution to the linear least squares problem can be outlined as: The basis of the vector space is x^2, y^2, z^2, xy, yz, zx, x, y, z, 1. The...
2
0
1
0
I have a set of experimentally determined (x, y, z) points which correspond to a parabola. Unfortunately, the data is not aligned along any particular axis, and hence corresponds to a rotated parabola. I have the following general surface: Ax^2 + By^2 + Cz^2 + Dxy + Gyz + Hzx + Ix + Jy + Kz + L = 0 I need to produce a...
Rotated Paraboloid Surface Fitting
0
0.197375
1
0
0
1,508
28,187,233
2015-01-28T07:56:00.000
0
0
0
0
1
python,matlab,curve-fitting,least-squares,surface
0
28,188,683
0
2
0
false
0
0
Do you have enough data points to fit all 10 parameters - you will need at least 10? I also suspect that 10 parameters are to many to describe a general paraboloid, meaning that some of the parameters are dependent. My fealing is that a translated and rotated paraboloid needs 7 parameters (although I'm not really sure)
2
0
1
0
I have a set of experimentally determined (x, y, z) points which correspond to a parabola. Unfortunately, the data is not aligned along any particular axis, and hence corresponds to a rotated parabola. I have the following general surface: Ax^2 + By^2 + Cz^2 + Dxy + Gyz + Hzx + Ix + Jy + Kz + L = 0 I need to produce a...
Rotated Paraboloid Surface Fitting
0
0
1
0
0
1,508
28,215,502
2015-01-29T13:05:00.000
2
0
0
1
0
python,svn,externals
0
28,215,771
0
1
0
true
0
0
First of all, don't use sed. Use Python's string methods or the re module. Second, I recommend to run svn propget ... first, to fetch the old value. Then, you manipulate it (within Python, no need to run sed). Finally, you run svn propset. Alternatively, you could run a second Python script as editor for svn propedit. ...
1
0
0
0
I am currently writing a python script which needs to run a sed command to replace stuff from the svn:externals data. I tried to run sed on "svn propedit svn:externals ." but the outcome is not the one expected. Does anyone know how to do this ?
Run replace command on svn:externals (python)
0
1.2
1
0
0
153
28,226,283
2015-01-29T22:58:00.000
-3
0
1
0
1
python,deployment
0
28,262,034
0
2
0
false
0
0
So the question is how do I solve this? You have not solve this problem anyhow. There is no any method to describe external dependencies outside of python ecosystem in setup.py. Just provide it in a README.
1
7
0
0
For python applications that install with pip, how can you handle their C extension requirements automatically? For example, the mysqlclient module requires development libs of MySQL installed on the system. When you initially install an application requiring that module it'll fail if the MySQL development libraries a...
How to handle C extensions for python apps with pip?
0
-0.291313
1
0
0
371
28,228,431
2015-01-30T02:48:00.000
0
0
0
0
0
python,pygame,collision
0
28,228,513
0
1
0
true
0
1
What you are looking for is functionality usually provided by a so-called physics engine. For very basic shapes, it is simple enough to code the basic functionality yourself. (The simplest case for 2D shapes is the collision detection between circles). Collision detection gets pretty hard pretty quickly, especially ...
1
0
0
0
I have a pygame program where there's a face in the center. What I want the program to do is have a bunch of objects on the screen, all irregular. Some would be circles, others would be cut-out pictures of objects like surf boards, chairs, bananas, etc. The user would be able to drag the objects around, and they'd coll...
Pygame image collision
0
1.2
1
0
0
123
28,253,855
2015-01-31T16:29:00.000
0
0
0
0
1
python,flask
1
28,257,714
0
1
0
false
1
0
you need to configure your firewall on your server/workstation to allow connections on port 5000. setting the ip to 0.0.0.0 allows connections to your machine but only if you have the port open. also, you will need to connect via the ip of your machine and not localhost since localhost will only work from the machine...
1
0
0
0
I have an apache server setup on a Pi, and i'm trying to learn Flask. I set it up so that The 'view' from the index '/' returns "hello world". then i ran my main program. nothing happens from the browser on the PC i'm SSH'ing from,I just get an error saying , but when i used the Pi directly and went to http:localhost:5...
Flask isn't recognising connections from other clients
1
0
1
0
0
48
28,280,308
2015-02-02T14:48:00.000
0
0
1
0
0
python,debugging,spyder
0
36,927,378
0
7
0
false
0
0
One minor extra regarding point 3: It also seemed to me the debug console frequently froze, doing prints, evaluating, etc, but pressing the stop (Exit debug) button usually got it back to the bottom of the call stack and then I could go back up ('u') to the frame I was debugging in. Worth a try. This might be for a la...
4
82
0
0
I like Python and I like Spyder but I find debugging with Spyder terrible! Every time I put a break point, I need to press two buttons: first the debug and then the continue button (it pauses at first line automatically) which is annoying. Moreover, rather than having the standard iPython console with auto completion ...
How do I debug efficiently with Spyder in Python?
0
0
1
0
0
113,747
28,280,308
2015-02-02T14:48:00.000
0
0
1
0
0
python,debugging,spyder
0
49,370,618
0
7
0
false
0
0
You can use debug shortcut keys like: Step Over F10 Step Into F11 in tools>preferences>keyboard shortcuts
4
82
0
0
I like Python and I like Spyder but I find debugging with Spyder terrible! Every time I put a break point, I need to press two buttons: first the debug and then the continue button (it pauses at first line automatically) which is annoying. Moreover, rather than having the standard iPython console with auto completion ...
How do I debug efficiently with Spyder in Python?
0
0
1
0
0
113,747
28,280,308
2015-02-02T14:48:00.000
61
0
1
0
0
python,debugging,spyder
0
28,285,708
0
7
0
true
0
0
(Spyder maintainer here) After our 4.2.0 version, released in November 2020, the debugging experience in Spyder is quite good. What we provide now is what people coming from Matlab would expect from a debugger, i.e. something that works like IPython and lets you inspect and plot variables at the current breakpoint or f...
4
82
0
0
I like Python and I like Spyder but I find debugging with Spyder terrible! Every time I put a break point, I need to press two buttons: first the debug and then the continue button (it pauses at first line automatically) which is annoying. Moreover, rather than having the standard iPython console with auto completion ...
How do I debug efficiently with Spyder in Python?
0
1.2
1
0
0
113,747
28,280,308
2015-02-02T14:48:00.000
1
0
1
0
0
python,debugging,spyder
0
39,023,817
0
7
0
false
0
0
Here is how I debug in Spyder in order to avoid freezing the IDE. I do this if I alter the script while in debugging mode. I close out the current IPython (debugging) console [x] Open a new one [Menu bar-> Consoles-> Open an IPython Console] Enter debug mode again [blue play pause button]. Still a bit annoying, but...
4
82
0
0
I like Python and I like Spyder but I find debugging with Spyder terrible! Every time I put a break point, I need to press two buttons: first the debug and then the continue button (it pauses at first line automatically) which is annoying. Moreover, rather than having the standard iPython console with auto completion ...
How do I debug efficiently with Spyder in Python?
0
0.028564
1
0
0
113,747
28,308,285
2015-02-03T20:38:00.000
0
0
1
0
0
python,multithreading
0
28,308,422
0
2
1
false
0
0
It depends. If your code is spending most of its time waiting for network operations (likely, in a web scraping application), threading is appropriate. The best way to implement a thread pool is to use concurrent.futures in 3.4. Failing that, you can create a threading.Queue object and write each thread as an infinit...
1
0
0
0
Since my scaper is running so slow (one page at a time) so I'm trying to use thread to make it work faster. I have a function scrape(website) that take in a website to scrape, so easily I can create each thread and call start() on each of them. Now I want to implement a num_threads variable that is the number of thread...
Python what is the best way to handle multiple threads
0
0
1
0
1
1,243
28,314,822
2015-02-04T06:27:00.000
0
0
1
0
0
python,multithreading
0
28,314,945
0
2
0
false
0
0
A background task should never try to kill a foreground task - it might be doing something important. The background task should pass a status of "Restart Needed" and the foreground task should exit when convenient or after prompting the user. This would be an extension of your current status checking. In your backgr...
1
0
0
0
I have a client and server model. The server periodically sends its healthy condition to client. The client has a background thread to take care of it(main thread is doing something else). Once the client notices the server is in a bad status, it will do some clean up work and then kill itself(kill the client process)....
python background thread cannot trigger function registered at atexit.register()
0
0
1
0
0
451
28,318,105
2015-02-04T09:42:00.000
0
0
0
0
1
django,python-2.7,apache2,mod-wsgi,pyinotify
0
28,320,868
0
2
0
false
1
0
You shouldn't prevent spawning multiple processes, because it's good thing, especially on production environment. You should consider using some external tool, separated from django or add check if folder listening is already running (for example monitor persistence of PID file and it's content).
2
1
0
0
I'm running apache with django and mod_wsgi enabled in 2 different processes. I read that the second process is a on-change listener for reloading code on change, but for some reason the ready() function of my AppConfig class is being executed twice. This function should only run once. I understood that running django ...
how to run Apache with mod_wsgi and django in one process only?
0
0
1
0
0
444
28,318,105
2015-02-04T09:42:00.000
2
0
0
0
1
django,python-2.7,apache2,mod-wsgi,pyinotify
0
28,321,203
0
2
0
false
1
0
No, the second process is not an onchange listener - I don't know where you read that. That happens with the dev server, not with mod_wsgi. You should not try to prevent Apache from serving multiple processes. If you do, the speed of your site will be massively reduced: it will only be able to serve a single request at...
2
1
0
0
I'm running apache with django and mod_wsgi enabled in 2 different processes. I read that the second process is a on-change listener for reloading code on change, but for some reason the ready() function of my AppConfig class is being executed twice. This function should only run once. I understood that running django ...
how to run Apache with mod_wsgi and django in one process only?
0
0.197375
1
0
0
444
28,327,779
2015-02-04T17:36:00.000
0
0
1
0
0
python,python-3.x,lighttable
0
28,327,929
0
4
0
false
0
0
Hit Ctrl + Space to bring up the control pane. Then start typing Set Syntax and select Set Syntax to Python. Start typing your Python then press Ctrl + Shift + Enter to build and run the program.
3
6
0
0
I am trying Light Table and learning how to use it. Overall, I like it, but I noticed that the only means of making the watches and inline evaluation work in Python programs uses Python 2.7.8, making it incompatible with some of my code. Is there a way to make it use Python 3 instead? I looked on Google and GitHub and ...
Running Python 3 from Light Table
0
0
1
0
0
4,744
28,327,779
2015-02-04T17:36:00.000
0
0
1
0
0
python,python-3.x,lighttable
0
28,331,730
0
4
0
false
0
0
I got the same problem. It worked for me after saving the file with a .py extension and then typing Cmd+Enter.
3
6
0
0
I am trying Light Table and learning how to use it. Overall, I like it, but I noticed that the only means of making the watches and inline evaluation work in Python programs uses Python 2.7.8, making it incompatible with some of my code. Is there a way to make it use Python 3 instead? I looked on Google and GitHub and ...
Running Python 3 from Light Table
0
0
1
0
0
4,744