Q_Id
int64
337
49.3M
CreationDate
stringlengths
23
23
Users Score
int64
-42
1.15k
Other
int64
0
1
Python Basics and Environment
int64
0
1
System Administration and DevOps
int64
0
1
Tags
stringlengths
6
105
A_Id
int64
518
72.5M
AnswerCount
int64
1
64
is_accepted
bool
2 classes
Web Development
int64
0
1
GUI and Desktop Applications
int64
0
1
Answer
stringlengths
6
11.6k
Available Count
int64
1
31
Q_Score
int64
0
6.79k
Data Science and Machine Learning
int64
0
1
Question
stringlengths
15
29k
Title
stringlengths
11
150
Score
float64
-1
1.2
Database and SQL
int64
0
1
Networking and APIs
int64
0
1
ViewCount
int64
8
6.81M
26,047,185
2014-09-25T20:07:00.000
-1
0
1
0
python,anaconda
26,047,701
3
false
0
0
You should try starting IDLE with the anaconda interpreter instead. AFAIK it's too primitive an IDE to be configurable which interpreter to use. So if anaconda doesn't ship one, use a different IDE instead, such as PyCharm, PyDev, Eric, Sublime2, Vim, Emacs.
2
6
1
I installed numpy, scipy, matplotlib, etc through Anaconda. I set my PYTHONPATH environment variable to include C://Anaconda; C://Anaconda//Scripts; C://Anaconda//pkgs;. import sys sys.path shows that IDLE is searching in these Anaconda directories. conda list in the command prompt shows that all the desired packages a...
import anaconda packages to IDLE?
-0.066568
0
0
7,062
26,047,185
2014-09-25T20:07:00.000
2
0
1
0
python,anaconda
26,067,690
3
false
0
0
You need to add those directories to PATH, not PYTHONPATH, and it should not include the pkgs directory.
2
6
1
I installed numpy, scipy, matplotlib, etc through Anaconda. I set my PYTHONPATH environment variable to include C://Anaconda; C://Anaconda//Scripts; C://Anaconda//pkgs;. import sys sys.path shows that IDLE is searching in these Anaconda directories. conda list in the command prompt shows that all the desired packages a...
import anaconda packages to IDLE?
0.132549
0
0
7,062
26,048,682
2014-09-25T21:47:00.000
0
1
0
0
python,encryption,sftp,pysftp
26,053,268
3
false
0
0
Do you mean you do not want the password to be visible in code or configuration file? There's no way to encrypt anything in a way that allows automatic decryption. All you can do is to obfuscate the password, but not really encrypt it. If anyone can access your code he/she can always reverse-engineer your "encryption".
1
0
0
I am using a Python script with the pysftp module to connect to SFTP server. Apparently I can pass a SFTP password explicitly which I don't like. My question: How could I replace the password for an encrypted one to avoid someone from being visible to the world?
How to encrypt password in Python pysftp?
0
0
0
2,397
26,049,674
2014-09-25T23:20:00.000
0
0
1
1
python,pip,homebrew
50,116,996
2
false
0
0
A linux command must be in a bin directory so you have no problem. Pip should be store in /usr/local/bin/pip not in /usr/local/share/python/pip.
2
0
0
I installed homebrew and which python gives /usr/local/bin/python . However when I type which pip I get/usr/local/bin/pip and not the desired /usr/local/share/python/pip How do I fix this?
Python Homebrew Error with Pip
0
0
0
140
26,049,674
2014-09-25T23:20:00.000
0
0
1
1
python,pip,homebrew
26,049,920
2
false
0
0
For my python 2.7.6 installation: My pip is installed to: /usr/local/bin/pip What makes you think it should be installed to /usr/local/share/python/pip? Are you seeing a problem when you try and use pip install (whatever)?
2
0
0
I installed homebrew and which python gives /usr/local/bin/python . However when I type which pip I get/usr/local/bin/pip and not the desired /usr/local/share/python/pip How do I fix this?
Python Homebrew Error with Pip
0
0
0
140
26,050,414
2014-09-26T00:53:00.000
1
0
0
1
python-2.7,wxpython
26,051,264
1
false
0
1
I don't know if Cloud9 supports it but normally to run a remote GUI application you would have ssh forward the X11 communication over the ssh connection via a tunnel. So basically the application is running on the remote system and it is communicating with a local X11 server which provides you with the display and han...
1
0
0
Does anyone know if it is possible to run python-gui apps, like wxPython, on a c9.io remote server? I have my home server set up with c9 via SSH, and no issues logging in and running apps in the terminal on the VM. However, when I try to run GUI apps, I get the following error message. Unable to access the X Display, ...
Running Python GUI apps on C9.io
0.197375
0
0
686
26,050,645
2014-09-26T01:24:00.000
0
0
0
1
python,jenkins
26,064,841
2
false
0
0
There's no easy way I know of to store the "variable" in jenkins. Your best bet is to use some other place to store this MAC address. A file would be a good place, but it probably needs to be on a shared fileserver somewhere.
1
3
0
I have a Jenkins job which executes a Python script (checkoutDevice.py) via shell. In checkoutDevice script, it connects to a inventory server and check out an available unit, unit's MAC address is available to return to Jenkins job I would like to return unit's MAC address from Python script to Jenkins job, so Jenki...
Return value from Python script to Jenkins variable
0
0
0
6,670
26,054,851
2014-09-26T08:04:00.000
0
0
0
1
c#,python,linux
39,438,068
1
false
0
0
For Linux you will find Statvfs in Mono.Unix.Native, in the Mono.Posix assembly.
1
2
0
I have a question. In my c# application I need to get the free space of a directory. According to my research, GetdiskfreespaceEx is proper and it works for me in my windows xp. Now I'm wondering if it works the same in a linux system. Since I wrote my c# program according to a python one, and for this function the dev...
Get free space of a directory in linux
0
0
0
854
26,058,888
2014-09-26T11:50:00.000
0
1
0
1
security,python-2.7,osx-mavericks,shellshock-bash-bug
26,074,861
1
false
0
0
Using python does not increase your risk of being exposed to shellshock. The best way to protect your computer is to make sure your computer has up-to-date patches and updates installed. Microsoft, Apple and various Linux distributions have all released updtes/patches which are supposed to fix the problem.
1
1
0
Various outlets, along with Apple, are assuring OS X users that they are not at particular risk from the Shellshock bash exploit. However, I use Python frequently on my system and wonder if that would increase my risk; and whether there is anything I can do to mitigate it (short of installing a different bash). I use...
Does using Python on OS X expose me to Shellshock?
0
0
0
61
26,065,129
2014-09-26T17:28:00.000
0
1
0
1
python,bash,shell,python-2.7,command
26,069,546
2
false
0
0
sharkbyte, It's easy to insert '#!/usr/bin/env python' at the top of all your Python files. Just run this sed command in the directory where your Python files live: sed -i '1 i\#! /usr/bin/env python\n' *.py The -i option tells sed to do an in-place edit of the files, the 1 means operate only on line 1, and the i\ is ...
1
0
0
I would like to run python files from terminal without having to use the command $ python. But I would still like to keep the ability of using '$ python to enter the python interpreter. For example if I had a file named 'foo.py', I can use $ foo.py rather than $ python foo.py to run the file. How can I do this? Would I...
How can I eliminate the need of the command 'python' when running a python file in terminal?
0
0
0
85
26,068,324
2014-09-26T21:07:00.000
1
0
1
1
python,python-2.7,pygtk,centos6.5,tryton
26,068,565
1
true
0
0
Unfortunately packages that are installed with one minor version of Python are not able to be used with another minor version (as an example, version 2.7.8 is major version 2, minor version 7, micro version 8). Different micro versions are compatible with one another, so packages installed with 2.7.3 will work with 2.7...
1
1
0
I have installed python 2.7 beside 2.6 on a CentOS 6.5 os. The particular application I want to install needs 2.7, but it also needs pygtk (as well as other stuff). If I start an interpreter with 2.6, it imports pygtk fine. But if I start an interpreter with 2.7 it can not find what it needs [pygtk]. There are plent...
centos 6.5 python 2.7 can not find pygtk that python 2.6 sees fine
1.2
0
0
1,310
26,069,257
2014-09-26T22:36:00.000
0
0
1
0
python,python-2.7,python-3.x,wxpython,ipython
26,082,455
2
false
0
0
Check out the wxPython demo, I would probably use the wx.lib.masked.numctrl for that.
1
0
0
Hi I am a beginner on Python and was wondering how you can make a user input a number that contains two decimal places or less
Python How to force user input to be to 2dp
0
0
0
130
26,070,040
2014-09-27T00:16:00.000
12
0
0
0
python,postgresql,psycopg2,python-multiprocessing
26,072,257
1
true
0
0
You can't sanely share a DB connection across processes like that. You can sort-of share a connection between threads, but only if you make sure the connection is only used by one thread at a time. That won't work between processes because there's client-side state for the connection stored in the client's address spac...
1
4
0
I have a Python script running as a daemon. At startup, it spawns 5 processes, each of which connects to a Postgres database. Now, in order to reduce the number of DB connections (which will eventually become really large), I am trying to find a way of sharing a single connection across multiple processes. And for this...
Share connection to postgres db across processes in Python
1.2
1
0
5,128
26,071,795
2014-09-27T06:00:00.000
0
0
1
0
python,anaconda
26,105,194
1
false
0
0
You don't run the files in site-packages directly to use the modules. You should start a Python console in Spyder or the IPython notebook and use import matplotlib to access matplotlib.
1
1
0
I'd like to run any example .py script that uses matplotlib or pyqtgraph to see how it looks. The problem is, none of the examples included with the Anaconda3-2.0.1-Windows-x86 install work. For example, I open Spyder3.4 that was installed with Anaconda, but when I open/run any of the .py files ( C:\Anaconda3\Lib...
Running Anaconda Python Examples
0
0
0
2,516
26,076,796
2014-09-27T16:33:00.000
2
0
0
0
python,xml
26,076,987
1
true
0
0
An XML file can't run a python script since XML is a descriptive language used to represent data. However you can do the opposite, that's to say, use python to read the XML file and do something. By the way when you say "run the A code of this XML file", i'm not sure you're doing it right, since XML is not supposed to ...
1
0
0
I was wondering if in an xml file I could launch a python file and based on what python returns run different parts of the xml code. Something like IN THE XML FILE: run the python file if the file retuns A, run the A code of this XML file else run the B code of this XML file thanks!
launch python file from an xml file
1.2
0
1
633
26,079,533
2014-09-27T21:48:00.000
0
0
1
0
python,ipython-notebook
26,085,782
1
false
0
0
The documentation was hard to parse, but I stumbled on the solution, which wasn't obvious to me. On OS X, using ipython notebook, the magic command %matplotlib osx causes any external graphics windows to be interactive. That is, I don't have to type show() and I don't have to close the graphics window to continue work...
1
0
0
I am trying to work out the best way to work with figures in ipython notebook. This is a problem on os x but not in windows. I have worked out how to put figures inline and in separate windows. What I'd like to do is put a figure in a separate window, leave it open and keep working on the notebook. But it seems I have ...
working with figures in python notebook in os x
0
0
0
34
26,080,694
2014-09-28T01:13:00.000
1
0
0
0
javascript,python,django,forms,security
26,081,085
1
false
1
0
I have a django app which need to receive post requests from another site using html+javascript. You don't have to ! You can build an API instead ;) You create an API call - small site calls the API of main site. In that situation, the form is handled by a view in small site and the API is called via the server. Che...
1
0
0
I have a django app which need to receive post requests from another site using html+javascript. For example i have mydjangosite.com and smallhtmlsite.com What i want is : user visit smallhtmlsite.com and fill a form, then he pushing submit button and mydjangosite.com receive request and create objects(form saving mo...
How to post a form to django site, securely and from another site
0.197375
0
0
389
26,081,164
2014-09-28T02:55:00.000
0
0
1
1
python,wing-ide
26,086,990
1
false
0
0
Open the file in Wing and then select Evaluate File in Python Shell from the Source menu. After that, functions/etc defined in the file can be accessed from the shell. You do need to redo that if you've edited the file. Or you may want to use the Active Range feature that's new in Wing 5.0.9: Select a range of cod...
1
1
0
I have a file called tweet.py located on my desktop which contains numerous functions that I would like to use in the wing-IDE. How do I include the file so I can use the functions in the python shell? I looked online but did not find anything to help me. Thanks guys. I'm using ubuntu 14.04, if that helps.
How to include file in wing-IDE
0
0
0
95
26,081,637
2014-09-28T04:32:00.000
2
0
0
0
python,logging,heroku,flask
26,085,702
1
true
1
0
Both outputs (print and logger) end up in a file, the only difference is that a logger typically allows for some filtering of the output and tries to add as little overhead as possible when messages are filtered out. This means its not possible to say without testing, IE comparing the two. You should be able to use the...
1
1
0
I've deployed an flask app on heroku and since it's relatively small I never bothered to setup the logger. I have found by using a print statement I can see everything I need on one of herokus add-on loggers. What I'm wondering is does that negatively affect performance vs had I just used the built in logger in flask? ...
When using a flask application does using print negatively affect performance?
1.2
0
0
349
26,081,880
2014-09-28T05:16:00.000
0
0
0
0
python-3.x,data-dump
26,089,798
2
false
0
0
Use one of the python xml modules to parse the .xml file. Unless you have much more that 27GB ram, you will need to do this incrementally, so limit your choices accordingly. Use the csv module to write the .csv file. Your real problem is this. Csv files are lines of fields. They represent a rectangular table. Xml fi...
1
2
1
I have stack overflow data dump file in .xml format,nearly 27GB and I want to convert them in .csv file. Please somebody tell me, tools to convert xml to csv file or python program
How to convert xml file of stack overflow dump to csv file
0
0
1
704
26,090,117
2014-09-28T22:02:00.000
8
0
1
0
python,django,python-3.x
26,090,123
1
true
1
0
Just make a list of the result by doing list(zip(...)).
1
6
0
I migrated from Python 2.7 to Python 3.3 and zip() does not work as expected anymore. Indeed, I read in the doc that it now returns an iterator instead of a list. So, how I am supposed to deal with this? Can I use the "old" zip() in my Python3 code? Find bellow the way it worked before in a Django project: in views.py:...
How can I get the "old" zip() in Python3?
1.2
0
0
4,304
26,090,711
2014-09-28T23:39:00.000
0
0
1
0
python,string,letters
26,090,772
4
false
0
0
You can try iterating over the characters of the string and if the character equals s, you take it to build a string. At the end the string would be "sss" if there were 3 's' in the string.
1
0
0
If the string is "43 Lobsters and 3 Crabs" I want to get only the s's from this string. There are three s's so in my new string I must have just "sss".
How do you get x amounts of y in one string and put it in another string in python?
0
0
0
40
26,090,938
2014-09-29T00:18:00.000
0
0
1
0
python,windows,ide
26,090,969
3
true
0
0
The "Edit with IDLE" option is actually placed there by IDLE itself. The thing you could do is just change the default program you want python files to be opened with (by right clicking, choosing "Open with" and choose a default program). The additional entries in the context menus are specified in the registry. So i t...
2
2
0
When I right-click on a .py file, I am given the option to "Edit with IDLE". How can I replace IDLE with another IDE, such as PyCharm? ie when I right-click on any .py file, I would like there to be the option to "Edit with PyCharm". I am using Windows by the way.
How do I change the default editor for a python file?
1.2
0
0
3,080
26,090,938
2014-09-29T00:18:00.000
0
0
1
0
python,windows,ide
26,091,010
3
false
0
0
Assuming you have Windows 7/8 and have the program (in this case PyCharm) installed already, you would: Right click any python file (typically ending with .py) Click "Open With" Either select PyCharm or the desired program from the list of programs OR Click Choose Default Program and 'find more options' or 'choose p...
2
2
0
When I right-click on a .py file, I am given the option to "Edit with IDLE". How can I replace IDLE with another IDE, such as PyCharm? ie when I right-click on any .py file, I would like there to be the option to "Edit with PyCharm". I am using Windows by the way.
How do I change the default editor for a python file?
0
0
0
3,080
26,095,180
2014-09-29T08:03:00.000
1
0
0
0
javascript,python,django,node.js,evercookie
26,095,512
1
true
1
0
You will have to break down your application as it is a humongous task to create something like GA. You will have to track many user activities(click,spend time etc).so you can do that in plain js or use a cross-platform lightweight library(angular.js) that can make your life a little easy. Now since you will have to s...
1
0
0
I want to create my own application for monitoring traffic of my website without using any third party tools like google analytics. In which I want to log screenshots, user details, page details and cookies. So what technology should I opt so as to achieve this goal and which will be best suited and what work flow shou...
Want to create a new application for website traffic monitoring ( analysis )
1.2
0
0
153
26,096,209
2014-09-29T09:06:00.000
3
0
1
0
python,scipy
26,099,751
1
false
0
0
nmax refers to the maximum number of internal steps that the solver will take. The default is 500. You can change it with the nsteps argument of the set_integrator method. E.g. ode(f).set_integrator('dopri5', nsteps=1000) (The Fortran code calls this NMAX, and apparently the Fortran name was copied to the error messa...
1
3
1
While using scipy 0.13.0, ode(f).set_integrator('dopri5'), I get the error message - larger nmax is needed I looked for nmax in the ode.py but I can't see the variable. I guess that the number call for integration exceeds the allowed default value. How can I increase the nmax value?
python scipy ode dopri5 'larger nmax needed'
0.53705
0
0
2,600
26,096,607
2014-09-29T09:27:00.000
2
0
1
0
python,maya,pymel
26,104,345
1
true
0
0
@beardedBerry's solution usually works; the main likely problem is that some kinds of history will screw up vert colors when the mesh is split. You can use an extra UV channel in the same fashion, the UV's tend to be more survivable then the vertex colors, although (rarely) they too can go bad. Sigh. If you want an a...
1
0
0
So I have a list of faces from a single mesh. That mesh (lets call it "A") is the result of combining an unknown number of meshes (you can assume that the list of faces equals one or more whole meshes that make up "A"). I then use separate on the mesh which results in a lot of separate meshes. What would be the best wa...
How to identify the resulting meshes after separating an object
1.2
0
0
205
26,098,710
2014-09-29T11:21:00.000
12
0
0
0
python,pandas,csv
54,617,685
9
false
0
0
The solution can be improved as data.rename( columns={0 :'new column name'}, inplace=True ). There is no need to use 'Unnamed: 0', simply use the column number, which is 0 in this case and then supply the 'new column name'.
2
53
1
My csv file has no column name for the first column, and I want to rename it. Usually, I would do data.rename(columns={'oldname':'newname'}, inplace=True), but there is no name in the csv file, just ''.
Rename unnamed column pandas dataframe
1
0
0
116,651
26,098,710
2014-09-29T11:21:00.000
5
0
0
0
python,pandas,csv
58,729,636
9
false
0
0
Try the below code, df.columns = [‘A’, ‘B’, ‘C’, ‘D’]
2
53
1
My csv file has no column name for the first column, and I want to rename it. Usually, I would do data.rename(columns={'oldname':'newname'}, inplace=True), but there is no name in the csv file, just ''.
Rename unnamed column pandas dataframe
0.110656
0
0
116,651
26,102,680
2014-09-29T14:49:00.000
1
0
0
0
python,flask,windows-firewall
28,746,633
2
false
1
0
When running as a service the program running the service is not python.exe but rather pythonservice.exe. You will have to add that to the allowed programs in the Windows Firewall Setup. In my case it is located under C:\Python33\Lib\site-packages\win32\pythonservice.exe.
1
3
0
We have developed an app in python and are using flask to expose its api via http requests. all this on WINDOWS - Everything works ok and we have tested in-house with no problems and we are now trying to use the app in the real world - we have gotten our IT dept to give us a public facing ip/port address (forwarded ...
how do i configure python/flask for public access with windows firewall
0.099668
0
0
8,285
26,103,566
2014-09-29T15:34:00.000
1
0
1
0
python,input,time,format,strptime
26,103,693
1
true
0
0
This is where the try statement is useful as it allows you to catch exceptions and deal with them. I am guessing that ValueError is the exception being thrown. try: time.strptime(whatever) except ValueError: # deal with it
1
0
0
In my program I take user input and then parse it using strptime(). This works mostly, but will throw an error if the input isn't formatted correctly. Is there a way I can check the format before parsing it so I can ask the user to re-enter?
Check user input formatting in python for strptime()
1.2
0
0
294
26,104,434
2014-09-29T16:21:00.000
0
0
0
0
python,regression,weka,raster,landsat
26,111,537
2
false
0
0
I have had some experience using LandSat Data for the prediction of environmental properties of soil, which seems to be somewhat related to the problem that you have described above. Although I developed my own models at the time, I could describe the general process that I went through in order to map the predicted d...
2
0
1
I'm trying to build and implement a regression tree algorithm on some raster data in python, and can't seem to find the best way to do so. I will attempt to explain what I'm trying to do: My desired output is a raster image, whose values represent lake depth, call it depth.tif. I have a series of raster images, each re...
method for implementing regression tree on raster data - python
0
0
0
709
26,104,434
2014-09-29T16:21:00.000
0
0
0
0
python,regression,weka,raster,landsat
26,123,179
2
false
0
0
It sounds like you are not using any spatial information to build your tree (such as information on neighboring pixels), just reflectance. So, you can apply your decision tree to the pixels as if the pixels were all in a one-dimensional list or array. A 600-branch tree for a 6000 point training data file seems like it...
2
0
1
I'm trying to build and implement a regression tree algorithm on some raster data in python, and can't seem to find the best way to do so. I will attempt to explain what I'm trying to do: My desired output is a raster image, whose values represent lake depth, call it depth.tif. I have a series of raster images, each re...
method for implementing regression tree on raster data - python
0
0
0
709
26,106,430
2014-09-29T18:27:00.000
0
0
0
1
python,windows,python-2.7
26,106,567
2
false
0
0
check if you are the specific user and if not do not run the python script. It can be done at least in the unix way by checking the uid, in windows you can use wmic useraccount get name,sid to get a users security identifier or in batch use %USERNAME%.
1
2
0
I have a python script that does some file processing and need to run as a specific user. Seems on Unix this can be done by using os.setuid. How do I do that in python on windows?
Execute script as a specific user
0
0
0
1,406
26,107,730
2014-09-29T19:49:00.000
0
0
1
1
python,osx-mavericks,enthought,canopy
26,110,135
2
true
0
0
Quit Canopy Delete the file ~/.canopy/locations.cfg. You can do this by opening a Terminal window and typing: rm ~/.canopy/locations.cfg Restart Canopy You'll be prompted again for your environment path.
2
0
0
I want to change the default environment (the folder where my Canopy files are stored), which I previously set to 'Documents' folder. But now I want to change the folder. If I just delete the folders, Canopy creates them again automatically, indicating that somewhere inside its logs it has saved the default location ad...
Changing default environment (default folder) in Canopy on Mac OSX
1.2
0
0
1,380
26,107,730
2014-09-29T19:49:00.000
1
0
1
1
python,osx-mavericks,enthought,canopy
33,323,045
2
false
0
0
You can change the root path for the file browser by modifying the variable "root_paths" in the file ./canopy/preferences.ini under the section [file_browser]
2
0
0
I want to change the default environment (the folder where my Canopy files are stored), which I previously set to 'Documents' folder. But now I want to change the folder. If I just delete the folders, Canopy creates them again automatically, indicating that somewhere inside its logs it has saved the default location ad...
Changing default environment (default folder) in Canopy on Mac OSX
0.099668
0
0
1,380
26,108,160
2014-09-29T20:19:00.000
0
0
0
0
python,mysql,sql,csv
26,108,522
2
true
0
0
The csv module can easily give you the column names from the first line, and then the values from the other ones. The hard part will be do guess the correct column types. When you load a csv file into an Excel worksheet, you only have few types : numeric, string, date. In a database like MySQL, you can define the size...
1
0
0
I have CSV files that I want to make database tables from in mysql. I've searched all over and can't find anything on how to use the header as the column names for the table. I suppose this must be possible. In other words, when creating a new table in MySQL do you really have to define all the columns, their names, th...
create database by load a csv files using the header as columnnames (and add a column that has the filename as a name)
1.2
1
0
3,067
26,109,520
2014-09-29T21:52:00.000
2
0
1
0
rethinkdb,rethinkdb-python
26,109,631
1
true
0
0
The process that appends new entries in your json file should probably run query to insert the same entries in RethinkDB. Or you can have a cron job that get the last entry saved from rethinkdb read your json file for new entries insert new entries
1
1
0
I have a log file by the name log.json. A simple insert in rethinkdb works perfectly. Now this json file get updated every second, how to make sure that the rethinkdb gets the new data automatically, is there a way to achieve this, or i have to simply use the API and insert into db as well as log in a file if i want to...
Insert json log files in rethinkdb?
1.2
0
0
167
26,111,811
2014-09-30T02:27:00.000
4
0
1
0
python,c,multithreading,user-interface,graph
26,111,839
2
false
0
0
igraph is good for graph visualisation. If you mean plotting points, use matplotlib. threading module is built-in with python standard library.
1
3
0
I am well experienced in the C languages, but for a project that I have been assigned in one of my classes, I am considering using it as a project to introduce me into Python. I have never used Python before, but I have done some research, and it is very clear that GUI design and Visualizations come very easy to Python...
Looking into getting into Python specifically for a project that involves threads and graphs
0.379949
0
0
53
26,112,179
2014-09-30T03:11:00.000
0
1
0
0
python,ssh,telnet,forwarding
44,082,308
2
false
0
0
Use tunneling by setting up a SSH session that tunnels the Telnet traffic: So ssh from localhost to server with the option -L xxx:deviceip:23 (xxx is a free port on localhost, device is the IP address of "device", 23 is the telnet port). Then open a telnet session on your localhost to localhost:xxx. SSH will tunnel it ...
2
2
0
telnet server ←————→ device ↑ | SSH ↓ localhost (me) I have a device that is connected with one server computer and I want to talk to the device by ssh'ing into the server computer and send telnet commands to my device. How do I setup things in Python to make this happen?
How to run telnet over ssh in python
0
0
1
2,315
26,112,179
2014-09-30T03:11:00.000
3
1
0
0
python,ssh,telnet,forwarding
26,112,392
2
true
0
0
You can use Python's paramiko package to launch a program on the server via ssh. That program would then in turn receive commands (perhaps via stdin) and return results (via stdout) from the controlling program. So basically you'll use paramiko.SSHClient to connect to the server and run a second Python program which ...
2
2
0
telnet server ←————→ device ↑ | SSH ↓ localhost (me) I have a device that is connected with one server computer and I want to talk to the device by ssh'ing into the server computer and send telnet commands to my device. How do I setup things in Python to make this happen?
How to run telnet over ssh in python
1.2
0
1
2,315
26,113,419
2014-09-30T05:33:00.000
2
0
0
1
python,sockets,udp,padding
26,326,206
1
true
0
0
This is pretty much impossible without playing around with the Linux drivers. This isn't the best answer but it should guide anyone else looking to do this in the right direction.3 Type sudo ethtool -d eth0 to see if your driver has pad short packets enabled.
1
0
0
I am trying to remove null padding from UDP packets sent from a Linux computer. Currently it pads the size of the packet to 60 bytes. I am constructing a raw socket using AF_PACKET and SOCK_RAW. I created everything from the ethernet frame header, ip header (in which I specify a packet size of less than 60) and the udp...
Removing padding from UDP packets in python (Linux)
1.2
0
1
1,669
26,116,350
2014-09-30T08:39:00.000
5
0
0
0
python,text,plot,formatting,pyqtgraph
26,129,313
2
true
0
1
It is not documented, but the method you want is TextItem.setHtml().
1
1
0
When creating a TextItem to be added to a plotItem in PyQtGraph, I know it is possible to format the text using html code, however I was wondering how to format the text (i.e. change font size) when updating the text through TextItem.setText()? or do I need to destroy/re-create a TextItem?
How to set font size using TextItem.setText() in PyQtGraph?
1.2
0
0
1,991
26,121,676
2014-09-30T13:06:00.000
0
1
0
0
php,python
26,121,763
1
true
0
0
You can use screen command to run the python script, then connect to the screen session anytime later from php with expect.
1
0
0
I have a problem in which I have to pass input to a Python script that must not terminate. Therefore I need to pass arguments to the Python script while it is running. The Python script will also not be executed in the same PHP script so it cannot incorporate any sort of expect script due to expect requiring that you s...
PHP Passing Input to Runing Python Script
1.2
0
0
53
26,123,939
2014-09-30T14:56:00.000
2
0
1
0
python,django
26,124,013
2
false
0
0
There's no huge difference, except 2 things : You have to give the execute right to your file manage.py (chmod +x manage.py) The file has to contain for example #!/usr/bin/python at the top.
1
4
0
I'm wondering if there any difference in using of following constructions? python manage.py [something] or ./manage.py [something] Maybe there is preffered command for one statement like runserver and another for syncdb for example?
Is there any difference in using: python manage.py [something] or ./manage.py [something]
0.197375
0
0
570
26,128,828
2014-09-30T19:43:00.000
0
0
0
0
python-3.x,pyqt,pyside
26,194,380
2
false
0
1
The default vertical size policy of QLineEditis QSizePolicy.Fixed. That means it will always have the same height and other widgets might take available space in the layout. So you might have to adjust the size policies of your widgets as Fenisko already demonstrated. However if you have two or more expanding widgets i...
1
1
0
If I have a QGridLayout and stack two widgets on top of each other, then they take up 50% of the layout each. However, if one of the widgets is a QLineEdit widget, then that widget takes up a much smaller portion of the layout than 50%. How do I add two widgets to a QGridLayout, then set the initial portions to somethi...
What's the proper way to resize widgets in a layout?
0
0
0
3,186
26,129,755
2014-09-30T20:43:00.000
1
0
1
0
python,python-2.7,pycharm,pyinstaller
26,133,713
1
false
0
0
By default, PyInstaller generates a one-folder bundle containing an executable, it also creates this executable with a console window for standard input/output. I'm just guessing, but your script don't have a GUI, right? In any case, the better way to work is creating a one-file bundle: pyinstaller -F myfile.py In thi...
1
0
0
I am trying to use PyInstaller for generating an .Exe from a Python 2.7 file. In the CMD window, I run pyinstaller myfile.py. It creates a build and dist folder both of which have a number of files, including an Application file. When I click both application files, a CMD box pops up and very quickly disappears, despit...
PyInstaller Issue with Application File Python 2.7
0.197375
0
0
697
26,133,396
2014-10-01T02:53:00.000
0
0
0
0
python,selenium
26,134,128
1
false
0
0
Let's pretend, that it isn't a human user, who enters the information and submits it, but it all is done automatically with some delay. How would you handle it then? I guess, that you would wait for a certain element to appear or the page something. The same procedure does work with the human user, only wait times may ...
1
0
0
I want to write a simple Python script using Selenium to scrape information from a website but in collaboration with a (standing by) human user who at some point will provide information in the browser. How do I get the following behaviour from the script: Wait until the human user enters information (such as login ...
Selenium to interact with human user to provide login information
0
0
1
151
26,135,477
2014-10-01T06:38:00.000
1
0
1
0
python,xmodmap
26,135,997
1
false
0
0
Yes, it is possible to implement xmodmap in pure Python by using a Python X11 client implementation such as python-xlib and re-implementing the functionality of xmodmap itself (i.e. updating the X11 server keyboards mappings with all the appropriate X11 functions, e.g. XSetModifierMapping to name but one). The xmodmap...
1
0
0
Is it possible to do the magic which xmodmap does with python? Use Case: I want to add a new layer to the current keyboard layout which gets entered with the CapsLock key. I want to avoid to call xmodmap via subprocess.
xmodmap in Python
0.197375
0
0
333
26,136,042
2014-10-01T07:18:00.000
0
0
1
0
python,path-finding,breadth-first-search
26,190,251
1
true
0
0
I found the answer. The split lists was a bad idea. I used linked lists instead. You can create a class called "Node" then connect the nodes yourself. Once of the properties of the node is the parent node. With the parent node, you can track all the way back up the tree. Look into linked lists.
1
0
0
So I understand breadth first search, but I am having trouble with the implementation. When there are multiple branches you are expanding the edges or successors of each branch on every iteration of the function. But when one of your nodes returns GOAL how do you get all of the previous moves to that location? Do you...
Breadth first search how to find a particular path out of several branches
1.2
0
0
111
26,136,643
2014-10-01T07:53:00.000
1
0
0
1
python,google-app-engine,cmd
26,136,777
1
true
1
0
dev_appserver doesn't "run a file" at all. It launches the GAE dev environment, and routes requests using the paths defined in app.yaml just like the production version. If you need to route your requests to a specific Python file, you should define that in app.yaml.
1
0
0
In order to start Google app engine through the cmd i use: dev_appserver.py --port=8080, but i can't figure how does it pick a file to run from the current directory. My question is, is there an argument specifying a file to run in the server from all possible files in the directory?
use dev_appserver.py for specific file in a directory
1.2
0
0
52
26,136,844
2014-10-01T08:06:00.000
1
0
0
1
java,python,weblogic,weblogic-10.x,wlst
26,177,888
1
true
1
0
Try again without the options. Just the stopApplication(appName). This is what the admin console does, kills all existing sessions and drags it to prepared state. You are trying to stop it gradually and hence the delay. You had mentioned, "when one of this application fail to deploy for X/Y reason, I just want to force...
1
1
0
I am currently working with weblogic and the thing is that I deploy several applications on my weblogic server. Sadly, when one of this application fail to deploy for X/Y reason, I just want to force stop this application and to pass to the other one. I've already looked into the WLST doc and I don't find what I am sea...
WLST - force stop application
1.2
0
0
3,907
26,137,036
2014-10-01T08:19:00.000
2
1
0
0
python,dns,dnssec
26,139,060
2
false
0
0
To see if a particular request is protected, look at the DO flag in the request packet. Whatever language and library you use to interface to DNS should have an accessor for it (it may be called something else, like "dnssec"). The first answer is correct but incomplete if you want to know if a certain zone is protected...
1
8
0
As the title says I want to programmatically check if a DNS response for a domain are protected with DNSSEC. How could I do this? It would be great, if there is a pythonic solution for this. UPDATE: changed request to response, sorry for the confusion
Programmatically check if domains are DNSSEC protected
0.197375
0
0
6,398
26,138,460
2014-10-01T09:43:00.000
0
0
1
0
python,multithreading,pyqt,pyqt4,usrp
26,153,975
2
false
0
1
There are several ways to do this, but basically either Breakup your waterfall sink into chunks of work, which the GUI can execute periodically. For example, instead of continuously updating the waterfall sink in a function that GUI calls, have only a "short" update (one "time step"), and have the function return righ...
1
0
0
I am trying to make a GUI in python using pyqt4 which incorporates a waterfall sink which is connected with an USRP. The problem is that the data should be shown in waterfall sink continuously which makes the GUI to freeze and I can not use the other buttons in meanwhile. I was checking to use threads, but till now wha...
Using threads with python pyqt?
0
0
0
352
26,142,468
2014-10-01T13:23:00.000
0
0
0
0
python,django,geodjango,django-countries
26,143,098
2
false
1
0
Personally I would set a generic flag as a fallback (django flag perhaps?) if user does not set their country, and to be fair there must be a reason if user doesn't. Or you can simply make that country field mandatory. And assuming that person in that country based on their existing IP just doesn't sound right. Imagine...
1
0
0
I am using django-countries to get a flag from the CountryField and it works. However, some users don't have a country set on their profiles, but I still have to display a flag. My idea was to get a country from IP and then get a flag from the country or anything similar to that. Unfortunately, this is not happening in...
Python/Django get country flag from IP
0
0
0
1,719
26,146,512
2014-10-01T16:55:00.000
1
0
1
0
python,algorithm,dictionary
26,146,580
1
true
0
0
First of all, Python dicts are unsorted (they are hash tables), so when you're talking about sorting a dict, you're really talking about a different data structure. If you only need to do this once, then O(n) is as good as it can be since you need to examine each of the n keys. Use a dictionary comprehension, and you'r...
1
2
0
I have an unsorted dictionary where value of a key is an integer. I want to get all keys where value is greater than some int k. approach 1: I can just easily loop over the dict and compare each value with int k. O(n) approach 2: I can sort but sorting a dictionary takes O(n log n) so approach 1 is better. approach 3:...
Get all items in a dictionary where value meets a condition
1.2
0
0
471
26,155,448
2014-10-02T06:26:00.000
0
0
0
1
python,qt,anaconda
26,186,264
2
false
0
1
QT aggressively tries to find other QT installations on the system. It is likely finding the one installed by Linux. You likely can't remove this, as there are probably several programs that come with Linux that use QT, but is it possible to update it to the same version?
1
4
0
I have install Anaconda 2.0.1 on KDE desktop. When I run python and would see all modules installed, I have this message "Cannot mix incompatible Qt library (version 0x40801) with this library (version 0x40805)", Can I fix the problem if I unintall Qt library (version 0x40801)? How I do that? Or if someone have anoth...
Cannot mix incompatible Qt library (version 0x40801) with this library (version 0x40805)
0
0
0
3,076
26,157,625
2014-10-02T09:07:00.000
1
0
0
0
mysql,django,python-2.7
26,158,170
1
false
1
0
It doesn't make sense to create a new database for each organization. Even if the number of customers or organizations grows to the hundreds or thousands, keeping data in a single database is your best option. Edit: Your original concern was that an increase in the number of organizations would impact performance. Well...
1
0
0
In my project there is two models ,ORGANISATION and CUSTUMER .Here what i am doing is while i am adding new customer to the organisation i save the organisation_id to the table CUSTOMER .But now i am worrying about the performance of my project when the database becomes huge. So now i am planning to create new database...
django multiple database for multiple organisation in a single project
0.197375
1
0
181
26,165,247
2014-10-02T16:29:00.000
1
0
0
0
python,openerp,openerp-7
26,207,355
2
false
1
0
Not sure I completely understand your question. A user may be able to do something in any company depending on their list of allowed companies, but a user can only ever do something in one company at a time. Any user can change their current company to one of the companies they are allowed but when they do this, the co...
1
1
0
I need to create a function that takes a default value, this value is distinct for each company. Thing is that I can't use the uid because the user can do this in any company, and I have no object to ask ids for because its for a default field. Is there any way to get the current company without using ids or the uid ? ...
Get the current company without ids or uid in Odoo / OpenERP
0.099668
0
0
5,993
26,166,024
2014-10-02T17:15:00.000
0
0
1
0
python,mysql,django,pillow
26,166,726
1
false
1
0
There's not really enough detail here to help. But one possibility is that you don't have the development package for python installed. If you are using Debian or Ubuntu, you can do sudo apt-get install python-dev to install it.
1
0
0
I've created python virtual environment, installed django using pip and now I would like to install Pillow and MySQL-python using pip but it fails during compile process. (starting with python.h no such file or directory) Has anyone tried intall some of these on 1and1 hosting ? Maybe compile it on different machine or ...
Python - install Pillow and MySQL-python on 1and1 hosting
0
0
0
390
26,166,210
2014-10-02T17:28:00.000
1
0
1
0
python,ftp
32,535,437
2
false
0
0
It should be fairly simple to use LIST, MLSD and NSLT to build a local index of the files on the FTP, and then use regex to filter unwanted files from the index, and then use the remainder in a batch script to download them.
1
1
0
I have an FTP server that hosts data files, where the date that the data is associated with is encoded into the file names. I want to write a process that can find and download all the files associated with a particular date. The complication is that different files use different encodings. (Unfortunately changing/stan...
Download Files From FTP Server Using Regular Expression
0.099668
0
0
1,772
26,178,035
2014-10-03T11:19:00.000
0
0
0
0
python,machine-learning,scikit-learn
38,604,808
2
false
0
0
The above answer was too short, outdated and might result in misleading. Using score method could only give accuracy (it's in the BaseEstimator). If you want the loss function, you could either call private function _get_loss_function (defined in the BaseSGDClassifier). Or accessing BaseSGDClassifier.loss_functions cl...
1
0
1
I'm using an SGDClassifier in combination with the partial fit method to train with lots of data. I'd like to monitor when I've achieved an acceptable level of convergence, which means I'd like to know the loss every n iterations on some data (possibly training, possibly held-out, maybe both). I know this information i...
Way to compute the value of the loss function on data for an SGDClassifier?
0
0
0
1,528
26,178,633
2014-10-03T12:07:00.000
0
0
0
0
python,django,database,sqlite
26,179,396
2
false
1
0
You could also use fixtures. And generate fixtures for your app. Dependes on what you're planing to do with them. You'll just make a loaddata after that.
1
0
0
How can i create Django sqlite3 dump file (*.sql) using terminal? There is a fabric fabfile.py with certain dump scripts, but when i try to use fab command next massage shows up: The program 'fab' is currently not installed. To run fab please ask your administrator to install the package 'fabric'. But there are fabri...
Django sqlite3 database dump
0
1
0
1,114
26,185,042
2014-10-03T18:55:00.000
2
0
1
0
python
26,185,109
2
false
0
0
I doubt there is going to be a significant (if any) memory savings from using frozenset over set. The reason to use a frozenset is that it is hashable, so you can use it as a dictionary key (or as an element of another set).
1
2
0
When using for x in obj notation, does iterating over a frozenset use less memory than a set? Or when is there a memory advantage to using a frozen set opposed to a set?
Memory difference iterating over frozen set vs set
0.197375
0
0
954
26,188,548
2014-10-04T00:47:00.000
1
0
0
1
python,google-app-engine
26,194,692
2
false
1
0
You could create a new application, use Datastore Admin to copy your entities to the new application's Datastore, then re-deploy your application. Is there anything else that needs duplicating?
2
0
0
I want to backup my python app and restore it to a different app on Appengine. In the Application Setting Page, under Duplicate Applications, I add a new application identifier. When I click the Duplicate Application button, I get this error: "The developer does not own the app id being forked". Further research ind...
How do I duplicate an appengine app
0.099668
0
0
59
26,188,548
2014-10-04T00:47:00.000
1
0
0
1
python,google-app-engine
26,194,002
2
false
1
0
Do you have more than one google account? I have found that app engine does unexpected things when you are logged into more than one google account at a time. I suggest logging into only a single google account and trying the operations again.
2
0
0
I want to backup my python app and restore it to a different app on Appengine. In the Application Setting Page, under Duplicate Applications, I add a new application identifier. When I click the Duplicate Application button, I get this error: "The developer does not own the app id being forked". Further research ind...
How do I duplicate an appengine app
0.099668
0
0
59
26,189,557
2014-10-04T04:17:00.000
1
0
0
0
python,mysql,django
26,194,172
1
false
1
0
I think your choice of type field is incorrect. Basically CharField with choices has limited functionality and you can't do this with it you can only filter the choices you declared initially but you can't add new ones on the fly (you will see them but they will not pass the field validation). I think you should go wit...
1
0
0
I want to select the options from a list in my django models. But the options in the list are populated in the post_save() method.The situation is like this: I enter some attributes in the table1 based on which the value of other attributes of the table is calculated using different algorithms in post_save() method. N...
Append choices to choice list in Django models dynamically
0.197375
0
0
785
26,190,859
2014-10-04T07:58:00.000
0
0
1
0
python
26,190,902
4
false
0
0
is returns True if both operands refer to the same object. The interpreter can use interning for immutable objects, but it is not guaranteed to.
2
0
0
The code "python" is "python" returns True. But why does (1,2,3) is (1,2,3) return False? Even though both are immutable objects, the is operator is evaluating differently. Why?
Why is operator giving different output for immutable objects?
0
0
0
92
26,190,859
2014-10-04T07:58:00.000
0
0
1
0
python
26,190,966
4
false
0
0
The only reason your first example is True is that string literals are interned when loaded from source code (I think this only applies to strings within a single file even). In nearly all cases other than string literals, objects created at different times will have different IDs.
2
0
0
The code "python" is "python" returns True. But why does (1,2,3) is (1,2,3) return False? Even though both are immutable objects, the is operator is evaluating differently. Why?
Why is operator giving different output for immutable objects?
0
0
0
92
26,191,698
2014-10-04T10:03:00.000
0
0
0
1
python,celery
26,271,816
1
true
0
0
When you say you want different log files for each worker do you mean for each worker node or for each pool worker process? If it is for each node, that is already supported. Do celery worker --help for more info. -f LOGFILE, --logfile=LOGFILE Path to log file. If no logfile is specified, st...
1
0
0
I have a custom python logging working. I want to build a celery custom logging, based on workers. I went through the Docs but couldn find a hint. Anyone can suggest me one such method to do so?
How to create Celery custom logging
1.2
0
0
368
26,196,165
2014-10-04T19:06:00.000
0
1
0
1
python,ubuntu,vps
26,196,763
1
true
0
0
Running a script on the server is the same as running locally. python script.py You may check if you have python installed first using which python (should return the python location) If not, get it using sudo apt-get install python after that, go to www directory and run it.
1
0
0
I've uploaded my .html chat file on my Ubuntu VPS, all that remains is to execute/run the python script pywebsock.py which will run the python server. I've uploaded the pywebsock.py to /bin/www and now I want to run it but I have no idea where to start. When I run the pywebsock.py on my desktop it opens up a terminal s...
Executing/Running python script on ubuntu server
1.2
0
0
2,380
26,198,847
2014-10-05T01:46:00.000
5
0
1
0
python,debugging,libraries,system-calls,pdb
26,198,855
2
false
0
0
os.mkdir() is implemented in C code and pdb cannot step into that function. You are limited to debugging pure Python code only; it doesn't matter if that code is part of the standard library or not. You can step into the shutil module, or os.path just fine, for example. os.mkdir() has to call into native code because i...
1
6
0
When I run my Python debugger, I can step into functions that I write. But if I try to step into a library function like os.mkdir("folder"), for example, it "steps over" it instead. Is there a way to step into builtin library functions to see what Python is doing under the hood? Ideally there'd be a way to do this in P...
Can I step into Python library code?
0.462117
0
0
2,631
26,199,088
2014-10-05T02:30:00.000
0
0
0
0
python,python-2.7
26,199,110
1
false
1
0
Assuming this array is a string array of x strings, you can create a substring from the index of the second instance of '|' to the end of the string.
1
0
1
Suppose you have this type of array (Sonny Rollins|Who Cares?|Sonny Rollins And Friends|Jazz| Various|, Westminster Philharmonic Orchestra conducted by Kenneth Alwyn|Curse of the Werewolf: Prelude|Horror!|Soundtrack|1996). Is there any possible way to only take out Sonny Rollins and Who cares from the array?
Is there a ways to take out the artist and song from the array?
0
0
0
27
26,199,115
2014-10-05T02:35:00.000
0
0
0
0
python,windows,console,pyqt,exe
26,208,237
1
false
0
1
The best solution is in the post linked to in a comment to your post, but on Windows you can also set a property on a shortcut that starts the app, to have the console minimized. It still shows in taskbar, there id you need it, can be handy in some situations(like during dev to use same script as user will, but not hav...
1
0
0
I create an exe executable of my application made ​​in pyqt, and everything went well, but when I run the exe in windows before opening the application opens a console and while the application is open that console is also. I need someone to tell me how to make the console does not come out, or at least not visible. I'...
The exe executable of my application, also opens a console
0
0
0
50
26,200,726
2014-10-05T07:55:00.000
0
0
0
1
python,linux,codeskulptor
26,200,815
3
false
0
0
It looks like an ordinary python package, so just: pip install --user SimpleGUICS2Pygame If that gives errors, post them.
1
0
0
Python. I've exhausted my research on this topic. I have it running on Windows just fine, but I can't figure out a way to install it on Linux. How do I install it on Linux?
SimpleGUICS2Pygame Installing on Linux
0
0
0
88
26,201,141
2014-10-05T09:00:00.000
0
1
1
0
python,django,gcc,hosting,virtualenv
27,670,939
3
false
0
0
You need root access to install the necessary packages to run your python application. PAAS like Heroku are another option but the free package at Heroku is only good for developing your application and it is not intended for hosting it once you get traffic and users. I strongly suggest you get a VPS at DigitalOcean.co...
1
6
0
I'm using Hostgator shared as a production environment and I had a problem installing some python modules, after using: pip install MySQL-python pip install pillow results in: unable to execute gcc: Permission denied error: command 'gcc' failed with exit status 1 server limitations no root access sudo doesnt work (sud...
installing python modules that require gcc on shared hosting with no gcc or root access
0
0
0
4,250
26,201,740
2014-10-05T10:28:00.000
0
0
0
0
python,audio,kivy,convolution
54,000,026
3
false
0
1
Kivy is not really obviously designed for Audio or Signal Processing and doesn't need to be thats why you have python and its massive collections of libraries, you can use 'numpy', 'scipy', 'librosa', and so on.... with numpy you could get an array of the signal
1
1
0
I would like to do some basic audio-signalprocessing in kivy. For example, I would like to convolve a .wav file with an impulse response. I use SoundLoader.load('file.wav') to load the audio files. My question is: is it possible to convert an audio object into a list, so I can access each sample? Or does the SoundLoade...
Audio processing in kivy
0
0
0
1,453
26,205,629
2014-10-05T18:04:00.000
1
0
1
0
ipython,ipython-notebook,pep8
26,205,934
2
false
0
0
.ipynb files are pure json, you can read it, concatenate all the cells, and run pep8 on it. On the other end, getting the correct cell number/line number to "fix" them would be slightly more difficult. I'm not aware of any project the does it right now.
1
1
0
Is there a way to verify that an iPython notebook's code is PEP8 compliant, after it has been exported as an .ipynb file?
Verifying PEP8 in exported iPython notebook code
0.099668
0
0
469
26,211,308
2014-10-06T07:04:00.000
0
0
0
0
python,twitter,machine-learning,classification,nltk
29,718,799
1
false
0
0
The thing is that how do I even generate/create a training data for such a huge data I would suggest finding a training data set that could help you with the categories you are interested in. So let's say price related articles, you might want to find a training data set that is all about price related articles and ...
1
1
1
So I have some 1 million lines of twitter comments data in csv format. I need to classify them in certain categories like if somebody is talking about : "product longevity", "cheap/costly", "on sale/discount" etc. As you can see I have multiple classes to classify these tweets data into. The thing is that how do I ev...
preclassified trained twitter comments for categorization
0
0
0
149
26,214,055
2014-10-06T10:10:00.000
1
1
0
0
python,unit-testing,code-coverage,coverage.py,python-coverage
63,373,136
5
false
0
0
I had similar case where I had multiple packages and each of them had its tests and they were run using own testrunner. so I could combine all the coverage xml by following these steps. Indivisually generate the coverage report. You would need to naviagte to each package and generate the report in that package. This w...
1
28
0
I'm wondering if it's possible to combine coverage.xml files into 1 file to see global report in HTML output. I've got my unit/functional tests running as 1 command and integration tests as the second command. That means my coverage for unit/functional tests are overridden by unit tests. That would be great if I had so...
combine python coverage files?
0.039979
0
1
19,392
26,222,066
2014-10-06T18:02:00.000
6
0
1
0
python,numpy
26,222,130
2
true
0
0
That's what __rmul__ is for. In your scenario, Python calls int.__mul__(-1, o). int doesn't know how to do this operation, so this call returns NotImplemented. Python therefore calls type(o).__rmul__(o, -1) giving your class the chance to handle it.
1
0
0
How is the operator overloading parsed? I have a class object o and want to do -1 * o with the overloaded __mul__ operator. Would that be parsed correctly when the left operand is a -1? Multiplication should be commutative (except for matrices and cross-products)... ?
Python operator overloading : commutative or right only?
1.2
0
0
652
26,224,243
2014-10-06T20:21:00.000
5
1
0
0
python,twitter,python-twitter
26,224,375
2
true
0
0
Fortunately not! Passwords are very confidential information which only Twitter itself wants to handle. Think about a third-party developer suggesting to change your Twitter password: would you trust them and let them see your new password? how could you make sure they are really going to set your new password and n...
1
4
0
Is there a way to change your twitter password via the python-twitter API or the twitter API in general? I have looked around but can't seem to find this information...
Password Change with the Twitter API
1.2
0
1
1,863
26,225,125
2014-10-06T21:26:00.000
4
0
1
0
python,python-2.7,py2exe
26,225,322
1
true
0
0
Py2exe doesn't actually create one single executable. You have to include the dlls and other files in the folder.
1
2
0
I compiled a simple python module using py2exe. It works fine for me when I run the executable through the cmd window, but when I give it to someone without Python installed, they get the following error message: LoadLibrary(pythondll) failedThe specified module could not be found. C:\PYTHON27.DLL How do I resolve this...
py2exe failed to load specified module
1.2
0
0
1,420
26,226,730
2014-10-07T00:16:00.000
2
0
1
0
python,macos,qt,pyqt,anaconda
51,688,988
9
false
0
1
I found it in this location in my mac /Users/ramakrishna/Qt/5.11.1/clang_64/bin/Designer.app command "open -a designer" also works on mac shell command + space bar and invoke spot light search and typing designer also find the designer app
4
13
0
I am trying to find Qt designer app on Mac. I installed anaconda package and conda reports that qt, sip, and pyqt are installed. Still I couldn't find the designer app in any of the folders. My Python app that uses pyqt works perfectly. I'm very new to macs and probably missing something very simple. I did search folde...
Where is Qt designer app on Mac + Anaconda?
0.044415
0
0
36,375
26,226,730
2014-10-07T00:16:00.000
5
0
1
0
python,macos,qt,pyqt,anaconda
36,830,816
9
false
0
1
OSX Yosemite 10.10.5 Qt 5.6 QtCreator 3.6.1 QtDesigner is part of my QtCreator. To use QtDesigner: Launch QtCreator, and from the menu bar (outside QtCreator), click on: File>New File or Project You will be presented with a New File or Project dialog window. In the Files And Classes section, select Qt. In the midd...
4
13
0
I am trying to find Qt designer app on Mac. I installed anaconda package and conda reports that qt, sip, and pyqt are installed. Still I couldn't find the designer app in any of the folders. My Python app that uses pyqt works perfectly. I'm very new to macs and probably missing something very simple. I did search folde...
Where is Qt designer app on Mac + Anaconda?
0.110656
0
0
36,375
26,226,730
2014-10-07T00:16:00.000
0
0
1
0
python,macos,qt,pyqt,anaconda
27,385,758
9
false
0
1
I can't answer you question definitively as I don't have OSX installed anywhere, but perhaps I can help lead you in the right direction. 1) you are going to want to be looking for Designer, not QT Creator, as Designer is what comes bundled with PyQt4 (PyQt4 is what Anaconda comes packaged with) 2) in linux when you ins...
4
13
0
I am trying to find Qt designer app on Mac. I installed anaconda package and conda reports that qt, sip, and pyqt are installed. Still I couldn't find the designer app in any of the folders. My Python app that uses pyqt works perfectly. I'm very new to macs and probably missing something very simple. I did search folde...
Where is Qt designer app on Mac + Anaconda?
0
0
0
36,375
26,226,730
2014-10-07T00:16:00.000
18
0
1
0
python,macos,qt,pyqt,anaconda
41,113,866
9
false
0
1
You can try open -a Designer from your terminal to launch Qt Designer that comes with Anaconda (version 4.x). If you have Qt5.x, you may want to launch a newer version of Designer by open -a Designer-qt5.
4
13
0
I am trying to find Qt designer app on Mac. I installed anaconda package and conda reports that qt, sip, and pyqt are installed. Still I couldn't find the designer app in any of the folders. My Python app that uses pyqt works perfectly. I'm very new to macs and probably missing something very simple. I did search folde...
Where is Qt designer app on Mac + Anaconda?
1
0
0
36,375
26,231,755
2014-10-07T08:30:00.000
3
0
1
0
python,qt,python-2.7
26,231,835
2
false
0
0
Convert to a string and find the position of the decimal point, relative to the length of the string.
1
9
0
In python, I import a file that has different length decimal places in the numbers, such as 7.2 or 7.2332 Is it possible to find out the number of decimal places in the number, if so, how? All the question I can find on SO are about formatting to a specific decimal place, but thats not what I am doing. The application...
Count decimal places in a float
0.291313
0
0
35,498
26,232,798
2014-10-07T09:28:00.000
1
0
0
1
python,linux,sockets,python-2.7,vmware
26,802,000
2
false
0
0
When you use NAT, the host machine has no way to directly contact the client machine. All you can do is usign port forwarding to tell vmware that all traffic directed to the designated ports on the host is to be delivered to the client. It is intended to install a server on the client machine that can be accessed from ...
1
2
0
I am trying to send a string from the windows to the linux vmware on the same machine. I did the following: - opened a socket on 127.0.0.1 port 50000 on the linux machine and reading the socket in a while loop. My programming language is python 2.7 - send a command using nc ( netcat ) on 127.0.0.1 port 50000 from the w...
Send a string from windows to vmware-ubuntu over socket using python
0.099668
0
1
2,245
26,235,884
2014-10-07T12:21:00.000
0
0
0
0
java,python,web-services,architecture
28,648,892
2
false
1
0
I would personally recommend wrapping the Python code in an HTTP layer and turning it into a REST web service. I don't doubt that many successful applications have been written by calling scripts from the command line, but I think there are a couple things that are really nice when it comes to the freedoms of a web ser...
2
1
0
I have a java web application that needs to make use of a python script. The web application will give the script a file as input and take some text as output. I have two options: Wrap the python script with HTTP and call it from the web application as a REST service Simply execute command line from the web applicati...
Execute the script in command line or in Rest client
0
0
1
663
26,235,884
2014-10-07T12:21:00.000
0
0
0
0
java,python,web-services,architecture
26,236,230
2
false
1
0
Try both things but try to execute in command line to know the output line by line. you can find any error in the line when that line will execute while at rest service it will return you an Http response.
2
1
0
I have a java web application that needs to make use of a python script. The web application will give the script a file as input and take some text as output. I have two options: Wrap the python script with HTTP and call it from the web application as a REST service Simply execute command line from the web applicati...
Execute the script in command line or in Rest client
0
0
1
663
26,238,097
2014-10-07T14:14:00.000
2
1
0
0
php,python,django,web-frameworks
26,238,910
1
true
1
0
You can use any of these framework since the have authetications nativly implemented but you don't need to, you can build your own authentication system: You will need a database/file to store credentails and a authentication program verifying credentials against this given storage in any language your webserver can us...
1
0
0
on my beaglebone i have installed hostapd, iscdhcp and lighttpd so i can build a router and webserver. let say my network is not secured so every on can be connected to it, and will get an ip-address from the beaglebone-server. After the person is connected to the network and he starts a browser he should be redirecte...
authentication on webserver
1.2
0
0
50
26,240,220
2014-10-07T15:56:00.000
7
0
1
0
python,random
26,240,285
1
true
0
0
For "secure" random numbers, Python doesn't actually generate them: it gets them from the operating system, which has a special driver that gathers entropy from various real-world sources, such as variations in timing between keystrokes and disk seeks.
1
7
0
I understand that I should use os.urandom() or SystemRandom in Python for 'secure' pseudo-random numbers. But how does Python generate these random numbers logically? Also is there a way to generate a number in Python that is 'more random' than others?
How does Python generate random numbers?
1.2
0
0
3,810
26,241,675
2014-10-07T17:23:00.000
0
0
1
0
python
26,241,848
4
false
0
0
Global is great if you really want just one set of data. And modifying globals has reasonable use cases also. Take the re module for example. It caches regular expressions its already seen in a global dict to save the cost of recompiling. Although re doesn't protect its cache with a lock, its common to use threading.Lo...
3
0
0
The general "why global variables are bad" answers don't seem to cover this, so I'm just curious if this would be bad practice or not. Here is an example of what I mean - You have one function to generate a list of itemsYou have another function to build these items You would like to output the current progress in eac...
Is it fine to use a global variable if it is only set once to avoid having to pass it to multiple functions?
0
0
0
73
26,241,675
2014-10-07T17:23:00.000
2
0
1
0
python
26,241,745
4
false
0
0
Global variables aren't bad in themselves. What's bad is modifying global variables in your functions. Reading global constants, which is what you're proposing here, is fine - you don't even need the global keyword, since Python will look up the var in surrounding scopes until it finds it. You might want to put your va...
3
0
0
The general "why global variables are bad" answers don't seem to cover this, so I'm just curious if this would be bad practice or not. Here is an example of what I mean - You have one function to generate a list of itemsYou have another function to build these items You would like to output the current progress in eac...
Is it fine to use a global variable if it is only set once to avoid having to pass it to multiple functions?
0.099668
0
0
73
26,241,675
2014-10-07T17:23:00.000
0
0
1
0
python
26,241,775
4
false
0
0
Maybe your design with function is bad. Consider using class to do this thinfs. Read about design patterns like Builder, Decorator, iterator etc.
3
0
0
The general "why global variables are bad" answers don't seem to cover this, so I'm just curious if this would be bad practice or not. Here is an example of what I mean - You have one function to generate a list of itemsYou have another function to build these items You would like to output the current progress in eac...
Is it fine to use a global variable if it is only set once to avoid having to pass it to multiple functions?
0
0
0
73
26,245,476
2014-10-07T21:18:00.000
1
1
0
0
javascript,python,html,email,outlook
26,245,689
1
true
1
0
Outlook Express, unlike real Outlook, does not provide any API to enumerate its messages. The only API exposed by OE is Simple MAPI.
1
0
0
I am trying to save a whole slew of emails as html in Outlook Express, but the program only lets me save them individually. If I click "Save As" on more than one email Outlook only lets me save them all in one .txt file. I was able to drag all of the files into a folder outside of outlook, but their file type is Outloo...
How can I save every Outlook Express Email as an html without clicking "Save As" for every email
1.2
0
0
123
26,246,015
2014-10-07T21:59:00.000
0
0
0
0
python,cluster-analysis,dbscan
68,602,469
4
false
0
0
Why not just flatten the data to 2 dimensions with PCA and use DBSCAN with only 2 dimensions? Seems easier than trying to custom build something else.
1
11
1
I have been searching around for an implementation of DBSCAN for 3 dimensional points without much luck. Does anyone know I library that handles this or has any experience with doing this? I am assuming that the DBSCAN algorithm can handle 3 dimensions, by having the e value be a radius metric and the distance between ...
Python: DBSCAN in 3 dimensional space
0
0
0
15,341
26,247,293
2014-10-08T00:15:00.000
0
0
0
0
python,django,django-settings
26,723,457
1
true
1
0
So the short answer to this question: Do not store global runtime data in Django's settings. Each new process thread will create its own instance of settings, meaning that your application will behave differently in each thread, or you'll have to run your app in single threaded mode (bad for performance). If you need t...
1
0
0
I want to use the Django Settings to indefinitely store a value. This value will change throughout the life span of the server process and should not be forgotten. See, what I am trying to do is generate a static file on my server's file system and store its generation time in django.conf.settings. I am more than aware...
Using Django Settings to cache a timestamp
1.2
0
0
129
26,258,420
2014-10-08T13:41:00.000
1
0
0
0
python,numpy,sympy
26,331,726
2
false
0
0
If you need a lot of precision, you can try using SymPy floats, or mpmath directly (which is part of SymPy), which provides arbitrary precision. For example, sympy.Float('2.0', 100) creates a float of 2.0 with 100 digits of precision. You can use something like sympy.sin(2).evalf(100) to get 100 digits of sin(2) for in...
1
2
1
I am solving a large non-linear system of equations and I need a high degree of numerical precision. I am currently using sympy.lambdify to convert symbolic expressions for the system of equations and its Jacobian into vectorized functions that take ndarrays as inputs and return an ndarray as outputs. By default, lambd...
Can lambdify return an array with dytpe np.float128?
0.099668
0
0
667