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
36,376,113
2016-04-02T16:54:00.000
0
0
0
0
dronekit-python,dronekit
36,377,649
1
false
0
0
Make sure that your parameter SR0_POSITION is higher than 0.
1
0
0
I'm using python-droneKit along with dronekit-sitl / rover-2.50, and when I try to acquire the vehicle.location.local_frame NED coordinates (after the vehicle has been armed) I only get None values. I'd appreciate if you could help me in this matter, thanks.
local_frame attribute returns none after vehicle is armed (ardurover-sitl)
0
0
0
90
36,376,317
2016-04-02T17:09:00.000
0
1
1
0
python,python-2.7,module,importerror,python-module
36,377,248
1
false
0
0
It means that win32 is not installed, try to install it again
1
0
0
After installing the module "win32" and then importing pythoncom I got the error listed above. Any idea why this is happening? I got this message after install : close failed in file object destructor: sys.excepthook is missing lost sys.stderr The installation directory: **C:\Python27\Lib\site-packages**
"ImportError: No module named pywintypes"
0
0
0
3,211
36,377,506
2016-04-02T18:57:00.000
-1
0
0
1
python,windows,devcon
43,858,051
1
false
0
0
I know this is very late. But your problem can be solved by the subprocess module. Let me know if you are unable to find what you need, and I will then post the code. Thanks
1
2
0
I am looking for solution, I want to disable/enable the particular device in windows system using devcon.exe in python script. I am able to disable/enable using devcon.exe windows cmd.exe separately but i am looking for this activity to done using python script to verify 10 iteration. I need to automate one test case w...
How to disable/enable device using devcon.exe in python for some iteration
-0.197375
0
0
992
36,380,183
2016-04-03T00:16:00.000
0
0
0
0
python,scikit-learn,pca
61,442,480
2
false
0
0
This previous answer is mostly correct except about the loadings. components_ is in fact the loadings, as the question asker originally stated. The result of the fit_transform function will give you the principal components (the transformed/reduced matrix).
2
8
1
Sklearn PCA is pca.components_ the loadings? I am pretty sure it is, but I am trying to follow along a research paper and I am getting different results from their loadings. I can't find it within the sklearn documentation.
Sklearn PCA is pca.components_ the loadings?
0
0
0
9,712
36,380,183
2016-04-03T00:16:00.000
13
0
0
0
python,scikit-learn,pca
36,386,315
2
true
0
0
pca.components_ is the orthogonal basis of the space your projecting the data into. It has shape (n_components, n_features). If you want to keep the only the first 3 components (for instance to do a 3D scatter plot) of a datasets with 100 samples and 50 dimensions (also named features), pca.components_ will have shape ...
2
8
1
Sklearn PCA is pca.components_ the loadings? I am pretty sure it is, but I am trying to follow along a research paper and I am getting different results from their loadings. I can't find it within the sklearn documentation.
Sklearn PCA is pca.components_ the loadings?
1.2
0
0
9,712
36,380,202
2016-04-03T00:18:00.000
0
0
0
0
python,google-drive-api
36,380,299
2
false
0
0
Hash the file names, stored the last file name into database Rename the file names using timestamp
1
0
0
So I have a script which uploads a file to a specific folder. I want to get URL of the most recently uploaded item in that folder? How would I accomplish this in as simple a manner is possibly. For example, say I have a folder called "Photos", and I want to retrieve the latest item that was uploaded to that folder and ...
Get the URL of the last item added to a folder
0
0
1
191
36,380,696
2016-04-03T01:36:00.000
0
0
0
0
python,machine-learning,neural-network
36,381,235
1
true
0
0
Assuming the NN is trained using mini-batches, it is possible to simulate (instead of generate) an evenly distributed training data by making sure each mini-batch is evenly distributed. For example, assuming a 3-class classification problem and a minibatch size=30, construct each mini-batch by randomly selecting 10 sa...
1
1
1
I need to train my network on a data that has a normal distribution, I've noticed that my neural net has a very high tendency to only predict the most occurring class label in a csv file I exported (comparing its prediction with the actual label). What are some suggestions (except cleaning the data to produce an even...
How to cancel the huge negative effect of my training data distribution on subsequent neural network classification function?
1.2
0
0
82
36,381,523
2016-04-03T04:10:00.000
0
0
1
0
python,string,list,python-3.x,swap
36,381,647
3
false
0
0
I think this should go to the comment section, but I can't comment because of lack of reputation, so... You'll probably want to stick with list index swapping, rather than using .pop() and .append(). .pop() can remove elements from arbitrary index, but only one at once, and .append() can only add to the end of the list...
1
0
0
Okay, I'm really new to Python and have no idea how to do this: I need to take a string, say 'ABAB__AB', convert it to a list, and then take the leading index of the pair I want to move and swap that pair with the __. I think the output should look something like this: move_chars('ABAB__AB', 0) '__ABABAB' and another e...
Swapping pairs of characters in a string
0
0
0
7,193
36,382,361
2016-04-03T06:38:00.000
1
0
1
0
python,macos,list,indexing
36,382,642
1
true
0
0
Could you provide an example of the code that ran successfully on their machine, but not yours? The behavior of list.index shouldn't be os dependent. It should throw a ValueError if the item is not in the list (at least in Python 3.4).
1
0
0
I am studying someone else's code that was written in Python on a Mac. I am using a PC. They use list.index in cases where exceptions will be generated (i.e: the items are missing), but they don't have exception handling. Therefore, I am trying to work out why their code ran successfully. Does list.index generate exce...
Python list.index behaviour on OSX?
1.2
0
0
78
36,385,070
2016-04-03T11:54:00.000
1
1
0
0
python,pdf
36,385,200
1
false
0
0
I would suggest studying many pdfs and write down every pdf label text size. Then, you can average the top 5 highest fonts and average the top 5 lowest fonts. Now, you can make a range between them and check text if it is in that text size range. This method will not work always, but, will cover the majority of pdfs. ...
1
0
0
I'm trying to extract the text from PDF by subjects. in order to do so im trying to identify the labels \ headlines in the PDF. So far I have converted the PDF into xml file, in order to get the text data more easily, and then using the font \ size of each in to deiced if a line is a label or not. the main problem with...
Extracting PDF text by subjects
0.197375
0
0
106
36,386,528
2016-04-03T14:16:00.000
1
0
0
1
google-app-engine,google-app-engine-python
36,388,402
1
false
1
0
App Engine > Dashboard This view shows how much you are charged so far during the current billing day, and how many hours you still have until the reset of the day. This is equivalent to what the old console was showing, except there is no "total" line under all charges. App Engine > Quotas This view shows how much of ...
1
0
0
In the old (non-Ajax) Google Appengine's Developer Console Dashboard - showed estimated cost for the last 'n' hours. This was useful to quickly tell how the App engine is doing vis-a-vis the daily budget. This field seems to be missing in the new Appengine Developer Console. I have tried to search various tabs on the C...
Estimated Cost field is missing in Appengine's new Developer Console
0.197375
0
0
18
36,388,952
2016-04-03T17:51:00.000
0
0
1
0
python-2.7
36,389,003
1
false
0
0
To my knowledge, there's no "cheap trick" you'll have to have all your class elements and compare their variable values with what you have . (Couldn't comment, sry) At least from what I understand you're trying to achieve, the question isn't very well constructed.
1
0
0
Can anyone tell me, whether there is a way to find which class a member variable belongs to, using the variable. I am trying to create a decorator that will allow only member method and variables of certain classes be used as method parameter. like @acceptmemberofclass(class1,class2) def method(memberfunc, membervar...
Python how to find which class owns a variable
0
0
0
29
36,390,762
2016-04-03T20:27:00.000
0
1
0
0
python-2.7,accelerometer,raspberry-pi2
36,732,250
1
true
0
0
After many many hours of research and fiddling I found out that nearly all electronic sensors have a bias. (bias is an offset) Now even the accelerometers apparently have serious offsets. So what I ended up doing is building a small test stand that was balanced by four screws. By running an active while loop, and outpu...
1
0
0
I am coding a MPU-6050 accelerometer/gyro to provide me with the accelerations and rotational velocities. Now the code works as far as to provide me with all accelerations and angular velocities. But the results are giving me marginally weird results. If I point the accelerometer that the positive z-axis points up I g...
MPU-6050 impossible readings Raspberry
1.2
0
0
197
36,391,651
2016-04-03T21:50:00.000
4
1
0
1
python,linux,alsa
36,391,683
2
true
0
0
The pid attribute of the subprocess.Popen object contains its PID, but if you need to terminate the subprocess then you should just use the terminate() method. You should consider using pyao or pygst/gst-python instead though, if you need finer control over audio.
1
2
0
I'm working with Iot on the Intel Galileo with a Yocto image, I have it that a python script will execute 'aplay audio.wav', But I want it to also get the PID of that aplay proccess in case the program will have to stop it. Sorry for being very short and brief.
Start a process with python and get the PID (Linux)
1.2
0
0
451
36,392,021
2016-04-03T22:29:00.000
0
0
1
0
python,python-3.x
36,392,636
1
true
0
0
You should either... Have all caching to happen at runtime: This beats your purpose. However, it is the only way not to touch the filesystem at all. Dedicate a special folder like __memo__ or something: This will allow you to have caching across several executions. However, you'll "pollute" the application's file stru...
1
2
0
I am writing a memoizing decorator for Python 3. The plan is to pickle the cache in a temporary file to save time across multiple executions. The cache will be deleted if the file containing the decorated function has been changed, just like the .pyc file in __pycache__. So then I started thinking about uncluttering t...
Should I store temporary files in the __pycache__ folder?
1.2
0
0
1,370
36,394,150
2016-04-04T03:31:00.000
1
1
1
0
python,c++,module
36,400,365
1
true
0
0
The concept in c++ is more complicated than it is with python, from what I remember of python, a module will work without having to take care of the architecture the module was developed. In C++ (as in C) you have the build process (compile, link) which is important to know when developping with these languages. In C/C...
1
0
0
Coming from programming in python, I am familiar with modules. What is the equivalent in c++?
Python has modules, what does c++ have?
1.2
0
0
534
36,394,194
2016-04-04T03:38:00.000
1
0
0
0
python,pandas
36,395,078
2
false
0
0
Use df.iloc[1] to select the second row of the dataframe (it uses zero based indexing). To select the second column, use df.iloc[:, 1] (the : is slice notation to select all rows).
1
2
1
While looking at indexing in pandas, I had some questions which should be simple enough. If df is a sufficiently long DataFrame, then df[1:2] gives the second row, however, df[1] gives an error and df[[1]] gives the second column. Why is that?
Pandas indexing confusion
0.099668
0
0
432
36,408,297
2016-04-04T16:43:00.000
0
0
0
1
python-3.x,file-io,path
36,409,314
2
false
0
0
Actually, unless you are using the new pathlib, the thing returned in both cases is just a str. Also, NT accepts / as a path delimeter and to posix \ is just another character. So -- no, you can't tell, at least not without trying to use the path; and that will only tell you if something is wrong, not if something can...
2
1
0
Macs return a Posixpath when the user enters a path. Windows returns a WindowsPath object when the user does the same thing. Is there a way for me to check whether the input is valid depending on the machine?
How to check whether someone enters a Path directory on Windows or Mac?
0
0
0
32
36,408,297
2016-04-04T16:43:00.000
1
0
0
1
python-3.x,file-io,path
36,408,579
2
true
0
0
os.path.sep gives you the path separator for the platform, \\ for windows and / for unix. But the thing is if you need this to implement a if else, then don't do that way. The os.path functions are aware of platform specific behavior and they will take care of it.
2
1
0
Macs return a Posixpath when the user enters a path. Windows returns a WindowsPath object when the user does the same thing. Is there a way for me to check whether the input is valid depending on the machine?
How to check whether someone enters a Path directory on Windows or Mac?
1.2
0
0
32
36,410,379
2016-04-04T18:41:00.000
1
0
1
0
python,gif
36,410,736
3
false
0
0
Try: image = Image.open(Point(x,y), "filename.gif") Looks like you may be missing open in Image.open
2
0
0
I need to display a .gif file in my source code. The only thing I've been able to find instruction wise is to use: image = Image(Point(x,y), "filename.gif") I keep getting an error that says: couldn't open "filename.gif": no such file or directory I'm not sure what to do? I think maybe I have the files I'm trying t...
Image use in Python
0.066568
0
0
406
36,410,379
2016-04-04T18:41:00.000
0
0
1
0
python,gif
36,411,522
3
false
0
0
Make sure its in the same folder as your python script. If that doesn't work, then set up a path like user Adam Smith did.
2
0
0
I need to display a .gif file in my source code. The only thing I've been able to find instruction wise is to use: image = Image(Point(x,y), "filename.gif") I keep getting an error that says: couldn't open "filename.gif": no such file or directory I'm not sure what to do? I think maybe I have the files I'm trying t...
Image use in Python
0
0
0
406
36,414,696
2016-04-04T23:37:00.000
3
0
0
0
python,python-3.x,select
42,612,778
1
true
0
0
The event value is a bitmap. If you get POLLIN(value:1), you have something to read, If you get POLLHUP(value:16), your input is ended, So when you get POLLIN(1) & POLLHUP(16) = 17, that meanss that your input is ended and that your have still something to read from the buffer, After you read everything from the bu...
1
1
0
I'm using select.poll on Ubuntu with a socket and have registered POLLIN, POLLERR, and POLLHUP. My understanding is that the condition when a POLLIN event occurs and recv() returns no data indicates that the peer has disconnected. My testing seems to verify this. But why do I not get POLLHUP? Does this have different s...
Python: select.POLLHUP
1.2
0
1
607
36,415,572
2016-04-04T19:00:00.000
0
0
0
0
python,orange
36,516,264
1
false
0
0
I don't understand what "exported with joblib" refers to, but you can save trained Orange models by pickling them, or with Save Classifier widget if you are using the GUI.
1
0
1
I'm evaluating orange as a potential solution to helping new entrants into data science to get started. I would like to have them save out model objects created from different algorithms as pkl files similar to how it is done in scikit-learn with joblib or pickle.
Can the model object for a learner be exported with joblib?
0
0
0
61
36,419,442
2016-04-05T07:09:00.000
0
1
0
0
python,amazon-web-services,boto,aws-sdk,aws-lambda
55,502,906
11
false
0
0
Most people end up in this error because of giving the wrong Role ARN in CloudFormation while creating the Lambda Function. Make sure the role is completed first by using "DependsOn" and use the intrinsic function """{ "Fn::GetAtt" : [ "your-role-logical-name", "Arn" ] }"""
6
73
0
I'm getting the error "The role defined for the function cannot be assumed by Lambda" when I'm trying to create a lambda function with create-function command. aws lambda create-function --region us-west-2 --function-name HelloPython --zip-file fileb://hello_python.zip --role arn:aws:iam::my-acc-account-id:rol...
The role defined for the function cannot be assumed by Lambda
0
0
0
78,602
36,419,442
2016-04-05T07:09:00.000
2
1
0
0
python,amazon-web-services,boto,aws-sdk,aws-lambda
44,550,586
11
false
0
0
For me, the issue was that I had set the wrong default region environment key.
6
73
0
I'm getting the error "The role defined for the function cannot be assumed by Lambda" when I'm trying to create a lambda function with create-function command. aws lambda create-function --region us-west-2 --function-name HelloPython --zip-file fileb://hello_python.zip --role arn:aws:iam::my-acc-account-id:rol...
The role defined for the function cannot be assumed by Lambda
0.036348
0
0
78,602
36,419,442
2016-04-05T07:09:00.000
45
1
0
0
python,amazon-web-services,boto,aws-sdk,aws-lambda
37,438,525
11
false
0
0
I'm also encountering this error. Have not got a definitive answer (yet) but figured I'd pass along a couple of hints that may help you and/or anyone else hitting this problem. A) If you build the Role ARN by putting together your account ID and role name, I think the account ID needs to be without any dashes B) If you...
6
73
0
I'm getting the error "The role defined for the function cannot be assumed by Lambda" when I'm trying to create a lambda function with create-function command. aws lambda create-function --region us-west-2 --function-name HelloPython --zip-file fileb://hello_python.zip --role arn:aws:iam::my-acc-account-id:rol...
The role defined for the function cannot be assumed by Lambda
1
0
0
78,602
36,419,442
2016-04-05T07:09:00.000
5
1
0
0
python,amazon-web-services,boto,aws-sdk,aws-lambda
62,650,143
11
false
0
0
I got this problem while testing lambda function. What worked for me was formatting JSON.
6
73
0
I'm getting the error "The role defined for the function cannot be assumed by Lambda" when I'm trying to create a lambda function with create-function command. aws lambda create-function --region us-west-2 --function-name HelloPython --zip-file fileb://hello_python.zip --role arn:aws:iam::my-acc-account-id:rol...
The role defined for the function cannot be assumed by Lambda
0.090659
0
0
78,602
36,419,442
2016-04-05T07:09:00.000
0
1
0
0
python,amazon-web-services,boto,aws-sdk,aws-lambda
65,418,455
11
false
0
0
It could be that the Lambda is missing an execution role. Or this role has been deleted. In console you can see the status at Lambda > Functions > YourFunction > Permissions. Even an IAM empty role with no policies is enough to make it work.
6
73
0
I'm getting the error "The role defined for the function cannot be assumed by Lambda" when I'm trying to create a lambda function with create-function command. aws lambda create-function --region us-west-2 --function-name HelloPython --zip-file fileb://hello_python.zip --role arn:aws:iam::my-acc-account-id:rol...
The role defined for the function cannot be assumed by Lambda
0
0
0
78,602
36,419,442
2016-04-05T07:09:00.000
2
1
0
0
python,amazon-web-services,boto,aws-sdk,aws-lambda
65,979,727
11
false
0
0
I had this error simply because I had a typo in the role ARN. I really wish the error was more explicit and said something along the lines of "this role doesn't exist", but alas.
6
73
0
I'm getting the error "The role defined for the function cannot be assumed by Lambda" when I'm trying to create a lambda function with create-function command. aws lambda create-function --region us-west-2 --function-name HelloPython --zip-file fileb://hello_python.zip --role arn:aws:iam::my-acc-account-id:rol...
The role defined for the function cannot be assumed by Lambda
0.036348
0
0
78,602
36,423,257
2016-04-05T10:06:00.000
1
0
0
1
python,nginx,dynamic,routing,tornado
36,427,016
1
true
0
0
When updating your python code you can start a new set of python processes on different ports (say 8001-8004 for the previous set and 8011-8014 for the new set) then modify you nginx config to redirect to 8011-8014 instead 8001-8004 and run service nginx reload (or equivalent for your OS). This way, nginx will redirect...
1
1
0
I have 4 python tornado threads running on different ports on different machines. I used nginx to route and load balance. The code is the same for all of them. It is a asynchronous code. I also have a local file, lets say function.py on each machine that gets called by the python thread, does some computation and retur...
dynamic routing , tornado deployment in production
1.2
0
0
412
36,427,384
2016-04-05T13:11:00.000
1
0
0
0
python,flask
36,445,638
2
true
1
0
Ok, Solution is : app.run( threaded=True, ...) Now it is possible to process at same time several requests, for exemple one for video streaming, other for video parameter tuning and so on.
1
3
0
I need two http servers in same python application (with two differents ports 8081 and 8082): One for a video stream coming from webcam and sent to WebBrowser; Second one for command (quality, filter, etc.) I don't succeed to define two Flask objects, because 'app.run' is blocking. Is it possible, or do I need to use a...
Several (two) Flask objects in same application
1.2
0
0
1,414
36,427,596
2016-04-05T13:20:00.000
0
0
0
0
python,gtk,pygtk,gtktreeview
36,670,919
1
false
0
1
The closest I've been able to get is a bit of a kludge. I use Perl, not Python, so I'll just describe my technique. Connect to the treeview's scroll-event signal and watch for direction=left/right (or smooth with get_scroll_deltas() returning non-zero for the X axis). Be sure to return FALSE for vertical scrolling so...
1
2
0
I am using a pygtk application and I have added a Treeview inside a ScrolledWindow. Now I want to freeze the first column (fix the column position), so that when scrolling the Treeview horizontally the column position is fixed and still visible (as it's done in excel for the row column). So how I can freeze the Treevie...
Freeze the first column in Treeview pygtk
0
0
0
544
36,431,659
2016-04-05T16:09:00.000
0
0
0
0
python,datetime,numpy,pandas,filtering
36,431,809
5
false
0
0
Sort your array Count contiguous occurrences by going through it once, & filter for frequency >= 20 The running time is O(nlog(n)) whereas your list comprehension was probably O(n**2)... that makes quite a difference on 2 million entries. Depending on how your data is structured, you might be able to sort only the ax...
2
1
1
I have an array of over 2 million records, each record has a 10 minutes resolution timestamp in datetime.datetime format, as well as several other values in other columns. I only want to retain the records which have timestamps that occur 20 or more times in the array. What's the fastest way to do this? I've got plen...
filter numpy array of datetimes by frequency of occurance
0
0
0
964
36,431,659
2016-04-05T16:09:00.000
0
0
0
0
python,datetime,numpy,pandas,filtering
36,454,679
5
false
0
0
Thanks for all of your suggestions. I ended up doing something completely different with dictionaries in the end and found it much faster for the processing that I required. I created a dictionary with a unique set of timestamps as the keys and empty lists as the values and then looped once through the unordered list (...
2
1
1
I have an array of over 2 million records, each record has a 10 minutes resolution timestamp in datetime.datetime format, as well as several other values in other columns. I only want to retain the records which have timestamps that occur 20 or more times in the array. What's the fastest way to do this? I've got plen...
filter numpy array of datetimes by frequency of occurance
0
0
0
964
36,434,276
2016-04-05T18:31:00.000
0
0
0
0
python,django,object,static,django-views
68,335,159
1
false
1
0
Try to make a fixture and before running server use manage.py loaddata
1
3
0
I am working on Django project. I need to create an object only once when the server initially starts. I want to use the methods associated with this particular object everytime a user accesses a particular page, that is I want the attributes and methods of this object to be accessible in views without having to instan...
Create object in Django once when the server starts and use it throughout
0
0
0
953
36,438,428
2016-04-05T22:47:00.000
1
1
0
0
python,graph-theory,networkx
36,454,065
1
true
0
0
The way the problem is posed doesn't make full sense. It is indeed a graph search problem to maximise a sum of numbers (subject to other constraints) and it possibly can be solved via brute force as the number of nodes that will end up being traversed is not necessarily going to climb to the hundreds (for a single trip...
1
0
0
I'm working on a graph search problem that can be distilled to the following simpler example: Updated to clarify based on response below The Easter Bunny is hopping around the forest collecting eggs. He knows how many eggs to expect from every bush, but every bush has a unique number of eggs. It takes the Easter Bunn...
Graph search - find most productive route
1.2
0
1
662
36,440,097
2016-04-06T01:53:00.000
0
0
1
0
python,save,memoization,lru
36,441,468
2
false
0
0
Nope, I think the only way to do this is to get information for the .cache_info() function and to write into file. It would a CacheInfo object that contains information you need.
2
2
0
I'm using the decorator @lru_cache(maxsize=None) from functools, and I wan't to save the memoized values to a file in order to avoid re-computing them each time I run the code. Is there an elegant way of doing this different from printing args and values to a file and then reading them?
How to export lru_cache in python?
0
0
0
735
36,440,097
2016-04-06T01:53:00.000
0
0
1
0
python,save,memoization,lru
40,699,839
2
true
0
0
@Carlos Pinzón, posted as an answer as you requested: functools.lru_cache() is designed to work with arbitrary positional and keyword arguments, and possibly a maximum cache size. If you don't need those features, it isn't too difficult to roll your own cache (aka memoize) decorator. The cache is just a dictionary, so ...
2
2
0
I'm using the decorator @lru_cache(maxsize=None) from functools, and I wan't to save the memoized values to a file in order to avoid re-computing them each time I run the code. Is there an elegant way of doing this different from printing args and values to a file and then reading them?
How to export lru_cache in python?
1.2
0
0
735
36,440,682
2016-04-06T02:58:00.000
1
0
1
1
python,ipython,jupyter
36,457,255
4
false
0
0
After trying a bunch of solution, I found the quickest solution: using conda instead of pip. Or just use anaconda, which provides jupyter, too.
4
1
0
I want to have jupyter notebook installed. But on my MacBook Pro (OS X El Capitan) and my web server (Debian 7), I get the same error: jupyter notebook is not a jupyter command. I just follow the official installation instruction. And no error occurs during installation. I searched for solutions but none of them work...
Jupyter: "notebook" is not a jupyter command
0.049958
0
0
2,769
36,440,682
2016-04-06T02:58:00.000
0
0
1
1
python,ipython,jupyter
41,560,474
4
false
0
0
I meet withe the same problem when I use fish,when I switch to bash,everything works well!
4
1
0
I want to have jupyter notebook installed. But on my MacBook Pro (OS X El Capitan) and my web server (Debian 7), I get the same error: jupyter notebook is not a jupyter command. I just follow the official installation instruction. And no error occurs during installation. I searched for solutions but none of them work...
Jupyter: "notebook" is not a jupyter command
0
0
0
2,769
36,440,682
2016-04-06T02:58:00.000
0
0
1
1
python,ipython,jupyter
41,647,660
4
false
0
0
In my case, it was a matter of agreeing to the Xcode License Agreement with: sudo xcodebuild -license, before running sudo pip install notebook.
4
1
0
I want to have jupyter notebook installed. But on my MacBook Pro (OS X El Capitan) and my web server (Debian 7), I get the same error: jupyter notebook is not a jupyter command. I just follow the official installation instruction. And no error occurs during installation. I searched for solutions but none of them work...
Jupyter: "notebook" is not a jupyter command
0
0
0
2,769
36,440,682
2016-04-06T02:58:00.000
0
0
1
1
python,ipython,jupyter
48,656,548
4
false
0
0
What worked for me was to use the following command in MacOS High Sierra 10.13. $HOME/anaconda3/bin/activate
4
1
0
I want to have jupyter notebook installed. But on my MacBook Pro (OS X El Capitan) and my web server (Debian 7), I get the same error: jupyter notebook is not a jupyter command. I just follow the official installation instruction. And no error occurs during installation. I searched for solutions but none of them work...
Jupyter: "notebook" is not a jupyter command
0
0
0
2,769
36,444,956
2016-04-06T08:00:00.000
0
0
1
0
python,zapier
72,431,133
2
false
0
0
We can import only requests, so we need to find another way to run any python code which include the other libraries. Maybe, we can build python to exe file and run it directly by zapier service.
2
1
0
Is there a way to import a library in Zapier Python Code? Specifically, I want the 'datasift' library. When I try, I just get "ImportError: No module named datasift"
Can I import a library in zapier code
0
0
0
1,137
36,444,956
2016-04-06T08:00:00.000
4
0
1
0
python,zapier
36,510,476
2
true
0
0
In the zapier documentation, it specifically says that it only allows for the requests import and standard python imports
2
1
0
Is there a way to import a library in Zapier Python Code? Specifically, I want the 'datasift' library. When I try, I just get "ImportError: No module named datasift"
Can I import a library in zapier code
1.2
0
0
1,137
36,445,162
2016-04-06T08:11:00.000
0
0
0
0
python,ajax,selenium
36,446,094
4
false
1
0
You can implement so-called smart wait. Indicate the most frequently updating and useful for you web element at the page Get data from it by using JavaScript since DOM model will not be updated without page refresh, eg: driver.execute_script('document.getElementById("demo").innerHTML') Wait for certain time, get it ...
2
1
0
I have already written a script that opens Firefox with a URL, scrape data and close. The page belongs to a gaming site where page refresh contents via Ajax. Now one way is to fetch those AJAX requests and get data or refresh page after certain period of time within open browser. For the later case, how should I do? Sh...
Python Selenium: How to get fresh data from the page get refreshed periodically?
0
0
1
1,158
36,445,162
2016-04-06T08:11:00.000
0
0
0
0
python,ajax,selenium
36,449,601
4
false
1
0
Make sure to call findElement() again after waiting, bc otherwise you might not get a fresh instance. Or use page factory, which will get a fresh copy of the WebElement for you every time the instance is accessed.
2
1
0
I have already written a script that opens Firefox with a URL, scrape data and close. The page belongs to a gaming site where page refresh contents via Ajax. Now one way is to fetch those AJAX requests and get data or refresh page after certain period of time within open browser. For the later case, how should I do? Sh...
Python Selenium: How to get fresh data from the page get refreshed periodically?
0
0
1
1,158
36,445,861
2016-04-06T08:42:00.000
4
0
0
1
python,root,python-2.x
36,445,985
2
true
0
0
Try to use os.seteuid(some_user_id) before os.system("some bash command").
2
2
0
I have a python 2 script that is run as root. I want to use os.system("some bash command") without root privileges, how do I go about this?
using os.system() to run a command without root
1.2
0
0
1,614
36,445,861
2016-04-06T08:42:00.000
-1
0
0
1
python,root,python-2.x
47,768,790
2
false
0
0
I have test on my PC. If you run the python script like 'sudo test.py' and the question is resolved.
2
2
0
I have a python 2 script that is run as root. I want to use os.system("some bash command") without root privileges, how do I go about this?
using os.system() to run a command without root
-0.099668
0
0
1,614
36,446,960
2016-04-06T09:28:00.000
-1
0
1
0
python,dictionary,max,min
66,118,397
5
false
0
0
For a rapid look at your dataframe's count, mean, max, min, standard deviation and quartiles you can use df.describe()
1
1
0
Let's say I have a dict of lists like this: mydict={10:[],20:[],30:[],40:[],50:[1],60:[],70:[1],80:[7, 2, 7, 2, 2, 7, 2],90:[5, 2, 2, 6, 2, 3, 1, 2, 1, 2],...} I want to compute: min, max, median, 1st and 3rd quartiles for each list in the dict. I tried min and max first, like this: mins_mydict={k:min(v) for k,v in myd...
Python: how to compute min, max, median, 1st and 3rd quartiles from a dict of lists?
-0.039979
0
0
1,504
36,450,840
2016-04-06T12:14:00.000
0
0
0
0
python,image-processing,3d,medical
36,453,666
4
false
0
0
Try using MeVisLab to do this easily. Also, you could try FSL for more robust results.
1
3
0
I have searched and found a lot of 2D image registration images in Python, but those will not serve my need. I have several MRI and CT images all taken of the same patient over time and was wondering if anybody had sample Python code for performing a 3D rigid image registration for these medical images.
3D multimodal medical image registration in python
0
0
0
4,816
36,452,520
2016-04-06T13:24:00.000
2
1
0
0
java,python
36,452,775
2
true
1
0
If you meant if there is something in python to handle ZIP format, there is. It is the module zipfile. Python comes with all batteries included.
1
0
0
I am working with byte arrays in Java 1.7. I am using java.util.zip's Inflater and Deflater classes to compress the data. I have to interface with data generated by Python code. Does Python have the capability to compress data that can be uncompressed by Java's Inflater class, and the capability to decompress data that...
Does Python have a zip class that is compatible with Java's java.util.zip Inflater and Deflater classes?
1.2
0
0
594
36,452,973
2016-04-06T13:42:00.000
1
0
1
0
python,anaconda,pythonxy
36,453,989
1
true
0
0
I solved the problem. Anaconda didn't clean the registry, so all modules were still registered. I did a search for "anaconda" in the registry and deleted all occurences. Now the Python(x,y) installation went well.
1
2
0
I'm trying to reinstall a Python(x,y) distribution on my computer. Before that, I had a Anaconda2 distribution and a WinPython distribution which I have uninstalled correctly (and removed system paths). I'm doing the custom installation of Python(x,y) to specify the Python path directory. The problem is that after the ...
Trouble with Python(x,y) installation that creates a C:\Anaconda2 directory
1.2
0
0
356
36,456,584
2016-04-06T16:10:00.000
1
0
0
0
python,pygame
36,456,629
1
false
0
1
Use python3.5 -mpip install pygame.
1
0
0
I am running El Capitan, when I type python --version the terminal prints Python 2.7.10, I have successfully downloaded pygame for Python 2.7.10 but I want to develop in python 3.5.1, I know I can do this by entering python3 in the terminal, but how do I properly set up pygame for this version of python?
How to download pygame for non default version of python
0.197375
0
0
44
36,457,076
2016-04-06T16:32:00.000
2
0
0
0
python,sqlalchemy,zodb
36,479,782
1
true
0
0
ZODB does not use SQLAlchemy, and there is no relational model. There are no tables to join, period. The ZODB stores an object tree, there is no schema. It's just Python objects in more Python objects. Any references to ZODB and SQLAlchemy are all for applications built on top of the ZODB, where transactions for extern...
1
0
0
I have been trying to find examples in ZODB documentation about doing a join of 2 or more tables. I know that this is an Object Database, but I am trying to create objects that represent tables. And I see that ZODB makes use SQLAlchemy. So I was wondering if I can treat things in ZODB in a relational like sense. I hope...
ZODB database: table joins
1.2
1
0
156
36,460,118
2016-04-06T19:02:00.000
1
0
0
0
python-3.x,python-idle
36,462,661
1
true
0
0
I presume you mean syntax coloring, and that your .ape files contain Python code. IDLE currently does not have a way to override file extensions. There is a request somewhere on the Python tracker to be able to turn syntax highlighting on for cases where python code is embedded in another file (.txt, .html, .rst, etc...
1
1
0
I am currently using a custom file extension in the python idle editor (.ape), but when I open it with the standard IDLE editor, it doesn't show the colours, everything is just black on white. So there a way of opening a non-python extension in the IDLE editor, and still have the colours? Sorry if this isn't the right ...
How can I use the python idle colours with a non-python file extension
1.2
0
0
69
36,460,455
2016-04-06T19:19:00.000
0
0
0
0
android-activity,automation,appium,python-appium
36,461,041
1
false
1
0
There are two ways to do it what I can think of, UI prospect : Capture the screenshot of the webview with 200 response. Let's call it expectedScreen.png Capture the screenshot of the under test response(be it 200, 400 etc.). Lets call this finalScreen.png Compare both the images to verify/assert. API prospect : Sin...
1
0
0
I verify launched current activity if it's in browser or in app by comparing with current activity. activity = driverAppium.current_activity And then I verify if activity matches with browser activity name e.g. org.chromium.browser... But can I verify the http response on the webpage e.g. 200 or 404? With above test al...
Verify appium current activity response
0
0
1
438
36,462,875
2016-04-06T21:41:00.000
0
0
0
0
python,django,testing,automated-tests
36,485,158
1
true
1
0
Ok, so the key is quite simple, the file is not supposed to start with test. I named it blub_test.py and then called it with ./manage.py test --pattern="blub_test.py"
1
0
0
I have a test file with tests in it which will not be called with the regular manage.py test command, only when I specifically tell django to do so. So my file lives in the same folder as tests.py and its name is test_blub.py I tried it with manage.py test --pattern="test_*.py" Any idea?
how to use --patterns for tests in django
1.2
0
0
528
36,462,908
2016-04-06T21:43:00.000
0
1
0
1
php,python,struct
36,464,750
1
false
0
0
It ended up being python gzip, that shiftet all bytes. Destroying the data.
1
0
0
I have created a python program using struct, that saves data in files. The data consists of a header (300 chars) and data (36000 int float pairs). On ubuntu this works and i can unpack the data for my php setup. I unpack the data in php by loading the content into a string and using unpack. I quickly found that 1 pair...
Python struct on windows
0
0
0
50
36,462,921
2016-04-06T21:44:00.000
3
0
1
0
python,jupyter,jupyter-notebook
36,562,213
5
false
0
0
This is not possible at the moment (April 12th 2016), but there is a ticket in the Jupyter github issues that mentions that "soon" we will be able to open several notebooks in the same browser tab; That would allow for the side by side comparisons you are looking for.
1
7
0
Is it possible to add a cell on the side of another cell, splitting the screen vertically? This seems very useful when comparing two lists of things. I don't see this options supported out of the box, so I am guessing it would require some extra js?
Jupyter notebook: split screen vertically (i.e. add cell horizontally)
0.119427
0
0
13,669
36,470,440
2016-04-07T08:17:00.000
0
0
0
0
python,arrays,numpy,matrix,indexing
36,471,599
2
true
0
0
I solved it by using np.squeeze(x) to remove the singleton dimensions.
1
0
1
I have a numpy array which is (1, 2048, 1, 1). I need to assign the first two dimensions to another numpy array which is (1, 2048), but I am confused on how to index it correctly. Hope you can help!
Indexing a Numpy Array (4 dimensions)
1.2
0
0
96
36,472,751
2016-04-07T09:59:00.000
0
0
0
0
java,android,python-3.x
36,472,877
5
false
1
0
Java Without a Doubt. The native language for Android Development is Java, So plan on going with Java
2
0
0
I am a beginner in Android development. But confused b/w the two technologies python and java.
what should I use for android app development : Java or Python?
0
0
0
1,319
36,472,751
2016-04-07T09:59:00.000
0
0
0
0
java,android,python-3.x
36,472,923
5
true
1
0
JAVA is the main language used in android apps. You can create app using python as well, but I will recommend you to use java as it is more orthodox and you can find tutorial for that too.
2
0
0
I am a beginner in Android development. But confused b/w the two technologies python and java.
what should I use for android app development : Java or Python?
1.2
0
0
1,319
36,473,334
2016-04-07T10:23:00.000
1
0
1
0
python,python-2.7
36,473,657
1
false
0
0
If you have pip installed, try to run pip install parse as root.
1
0
0
Can somebody let me know how to install python "parse" module for python2.7 version? Server details : CloudLinux Server release 5.11 cPanel 54.0 (build 21)
Parse python module installtion for python 2.7
0.197375
0
0
3,954
36,475,003
2016-04-07T11:35:00.000
1
0
0
0
python,qt,pyside
36,476,989
1
true
0
1
You're assuming two things: The app has implemented its styling using stylesheets, and The app uses an application-wide stylesheet. Either of these assumptions is wrong in your case. You might need to extract stylesheets from individual widgets. Or the application might be using a custom QStyle and not stylesheets.
1
2
0
Is there a way to "rip" Qt stylesheet from Python app? .styleSheet() returns an empty string.
Get Qt stylesheet from Python app
1.2
0
0
171
36,475,363
2016-04-07T11:52:00.000
0
0
1
0
python
36,477,116
2
false
0
0
While being treated specially - it's automagically called with the newly created instance at instanciation time -, __init__ is by itself just an ordinary Python function, so it implicitely returns None unless you try to explicitely return something else... But then you will find out (at call time) that it's not allowed...
2
0
0
I am confused in return type and value of__init__() in Python. Does __init__() return value or else and what is return type of__init__()?
Return type and value of init
0
0
0
109
36,475,363
2016-04-07T11:52:00.000
2
0
1
0
python
36,475,713
2
true
0
0
init doesn't and shouldn't return any thing other than None. The purpose of init, as its name says, is to initialize attributes. You can actually try to return None in init but not returning anything would by default return None in Python.
2
0
0
I am confused in return type and value of__init__() in Python. Does __init__() return value or else and what is return type of__init__()?
Return type and value of init
1.2
0
0
109
36,478,336
2016-04-07T13:54:00.000
0
0
1
0
python,sockets,memory-leaks,tkinter
38,483,492
1
true
0
1
I discovered the cause by myself, so I write it here and close the question. The cause of memory leak was I was calling tkinter functions from multiple threads. tkinter is not thread safe so I was violating its rule. I modified my program so that only main thread use tkinter function then memory leak has gone. Thank yo...
1
0
0
I made a app with Python 3.4 and Tkinter. My app runs several (3-5) threads, and each thread does below. endless loop of recvfrom() to get message from socket(UDP) endless loop which displays the message and write it to a file I use my app on windows embedded OS which is based on XP, and I watch memory usage with Tas...
Windows Task Manager: Python app memory usage increase
1.2
0
0
232
36,480,233
2016-04-07T15:08:00.000
0
0
0
0
python,math,simulation,kalman-filter
36,484,420
2
false
0
0
Steady state KF requires the initial state matches the steady state covariance. Otherwise, the KF could diverge. You can start using the steady state KF when the filter enters the steady state. The steady state Kalman filter can be used for systems with multiple dimension state.
2
0
1
I am working with discrete Kalman Filter on a system. x(k+1)=A_k x(k)+B_k u(k) y(k)=C_k x(k) I have estimated the state from the available noised y(k), which one is generated from the same system state equations with Reference Trajectory of the state. Then I have tested it with wrong initial state x0 and a big initia...
State Estimation of Steady Kalman Filter
0
0
0
764
36,480,233
2016-04-07T15:08:00.000
1
0
0
0
python,math,simulation,kalman-filter
36,666,450
2
true
0
0
Let me first simplify the discussion to a filter with a fixed transition matrix, A rather then A_k above. When the Kalman filter reaches steady-state in this case, one can extract the gains and make a fixed-gain filter that utilizes the steady-state Kalman gains. That filter is not a Kalman filter, it is a fixed-gain...
2
0
1
I am working with discrete Kalman Filter on a system. x(k+1)=A_k x(k)+B_k u(k) y(k)=C_k x(k) I have estimated the state from the available noised y(k), which one is generated from the same system state equations with Reference Trajectory of the state. Then I have tested it with wrong initial state x0 and a big initia...
State Estimation of Steady Kalman Filter
1.2
0
0
764
36,481,830
2016-04-07T16:17:00.000
0
0
1
0
python,python-3.x,matplotlib
36,506,203
2
false
0
0
On the first part of the question: a color map in mpl is intended to represent a function from [0, 1] to colors. mpl only has two very simple classes for that purpose: LinearSegmentedColorMap and ListedColorMap. LinearSegmentedColorMap can represent any color map for which each of the three channels (R, G, B) is a piec...
1
3
0
What's the difference between a colormap (as required by contour and many other plotting functions) and a simple list of colors? How do I convert a list of colors (where each color is supposed to be represent equal-sized step) into a colormap?
Difference between cmap and a list of colors
0
0
0
1,751
36,482,154
2016-04-07T16:32:00.000
1
0
0
0
python,matplotlib,event-handling,mouseevent
36,489,509
2
false
0
0
I feel that this might be more easily resolved by altering the hardware - can you temporarily unplug the mouse, or tape over the track pad to stop people fiddling with it? I suggest this because your crashing script will always process mouse-clicks in some way, and if you don't know what's causing the crashes then you ...
1
0
1
I've recently built a python script that interacts with an Arduino and a piece of hardware that uses LIDAR to map out a room. Everything works great, but anytime you click on the plot that is generated with maptotlib, the computer freaks out and crashes the script that is running. This is partly because I was given a $...
Ignore all mouse clicks on a matplotlib plot
0.099668
0
0
175
36,482,419
2016-04-07T16:45:00.000
-2
1
0
0
bdd,python-behave
37,288,247
5
false
0
0
You can use predefined "@skip" tag for the scenarios or features that you would like to skip and behave will automatically skip testing the scenario or the whole feature.
1
12
0
I'm juggling code branches that were partly done a few months ago, with intertwined dependencies. So the easiest way to move forward is to mark failing tests on a particular branch as pending (the rspec way) or to be skipped, and deal with them after everything has been merged in. In its final report, behave reports th...
How do I skip a test in the behave python BDD framework?
-0.07983
0
0
15,075
36,485,392
2016-04-07T19:25:00.000
0
0
1
1
ipython,beaker-notebook
37,124,128
2
false
0
0
If you want to change the current working directory, I don't think that's possible. But if you want to serve files as in make them available to the web server that creates the page, use ~/.beaker/v1/web as described in the "Generating and accessing web content" tutorial.
1
2
0
Trying to experiment with Beaker Notebooks, but I can not figure out how to launch from a specified directory. I've downloaded the .zip file (I'm on Windows 10), and can launch from that directory using the beaker.command batch file, but cannot figure out where to configure or set a separate launch directory for a spec...
How to serve Beaker Notebook from different directory
0
0
0
178
36,489,891
2016-04-08T01:13:00.000
0
0
1
0
python,api,get,onenote,onenote-api
36,504,337
1
false
1
0
Yesterday (2016/04/08) there was an incident with the OneNote API which prevented us from updating the list of pages. This was resolved rpughly at 11PM PST and the API should be returning all pages now.
1
2
0
I want to get a list of all the pages in a given section for a given notebook. I have the id for the section I want and use it in a GET call to obtain a dictionary of the section's information. One of the keys in the dictionary is "pagesUrl". A GET call on this returns a list of dictionaries where there's one dictionar...
OneNote's PagesUrl Not Including All Pages in a Section
0
0
1
61
36,490,085
2016-04-08T01:40:00.000
2
1
0
0
python,python-2.7,twitter,tweepy
42,499,529
3
false
0
0
Once you have a tweet, the tweet includes a user, which belongs to the user model. To call the location just do the following tweet.user.location
1
5
0
I am starting to make a python program to get user locations, I've never worked with the twitter API and I've looked at the documentation but I don't understand much. I'm using tweepy, can anyone tell me how I can do this? I've got the basics down, I found a project on github on how to download a user's tweets and I un...
How to get twitter user's location with tweepy?
0.132549
0
1
13,479
36,491,776
2016-04-08T04:52:00.000
1
0
1
0
python,windows,virtualenv,virtualenvwrapper
36,491,794
2
false
0
0
When you do mkvirtualenv name it's creating the virtualenv in the current directory you're in in the shell. To create it in the place you want you either need to specify the path or navigate there and create the virtualenv
1
3
0
I'm extremely new to Python and virtualenv, so I apologize if this is an obvious question. I've got a C drive and a D drive on my pc running windows 10. I have the python and scripts path set to the proper location on the D drive. In console, i did a pip install virtualenv and pip install virtualenvwrapper-win. Af...
Virtualenvwrapper creating project in wrong directory?
0.099668
0
0
2,709
36,494,553
2016-04-08T08:05:00.000
0
1
0
1
python,bash,apache,server,pyramid
36,502,436
2
false
0
0
Well you changed the owner of the files to root, and then you ran as root, and it worked, so that makes sense. The problem is that root isn't necessarily the user executing the script in your webapp. You need to find which user is trying to execute the script, and then change the files' ownership to that user (depend...
1
0
0
I have a web application which is written with python (Pyramid) and in the apache server, inside of the one of the Python we are launching a SH file which is a service to sending SMS. The problem is always the permission is denied. we tried the run the SH file by login into the root and it works. we changed the owner o...
Permission denied or Host key problems
0
0
0
39
36,498,754
2016-04-08T11:45:00.000
2
0
1
0
python,algorithm,numpy,mesh,voxel
36,692,391
2
true
0
0
I solved my problem if it can be usefull. Marching Cubes algorithm is good, but it doesn't work well on binarized arrays. So: 1) Gaussian Filter applied to the 3D array (scipy.filters) 2) Marching Cubes algorithm to mesh it (scikit-image tool) 3) Sum up the areas of triangles (scikit-image tool)
1
1
0
I have a voxels assembly which represents a stone in 3D. It's a binarized numpy 3D array in which 1 is assigned to voxels which make up my stone and 0 elsewhere. I want to: create its meshed surface calculate the surface area on it. But how?
Python: Mesh a voxels assembly to compute the surface area
1.2
0
0
2,637
36,500,141
2016-04-08T12:56:00.000
1
0
1
0
python,dependencies,pip,virtualenv,pythonpath
36,500,820
2
false
0
0
For dependency isolation and management I always have one virtualenv per application. This prevents issues with inter-application dependency conflicts and if there are dependency conflicts within an application's dependency any hackery to workaround them is limited to the affected environment. Also, dependency upgrade...
1
9
0
we are trying to install several own written python3 applications sharing some libraries with conflicting versions. We are currently discussing employing the order of packages inside the PYTHONPATH and/ or pythons virtualenv. How would you handle this?
Python packages with conflicting dependencies
0.099668
0
0
14,266
36,504,357
2016-04-08T16:09:00.000
5
0
1
0
python,c++,naming-conventions
36,504,455
2
false
0
0
I think that writing the adjective before the noun is the more common thing. But if you think about it for a second, writing it after the noun is easier when reading your code. The adjective can easily be seen as a attribute of the noun. In a logic way of thinking, this is the better way in my opinion.
1
14
0
I find that I am often a little inconsistent in my naming conventions for variables, and I'm just wondering what people consider to be the best approach. The specific convention I am talking about is when a variable needs to be described by a noun and an adjective, and whether the adjective should come before or after ...
Should variable names have adjectives before or after the noun?
0.462117
0
0
1,901
36,518,400
2016-04-09T14:50:00.000
3
0
0
1
python,asynchronous,concurrency,celery
36,518,663
2
false
0
0
Asynchronous IO is a way to use sockets (or more generally file descriptors) without blocking. This term is specific to one process or even one thread. You can even imagine mixing threads with asynchronous calls. It would be completely fine, yet somewhat complicated. Now I have no idea what asynchronous task queue mean...
1
7
0
As I understand, asynchronous networking frameworks/libraries like twisted, tornado, and asyncio provide asynchronous IO through implementing nonblocking sockets and an event loop. Gevent achieves essentially the same thing through monkey patching the standard library, so explicit asynchronous programming via callbacks...
Asynchronous task queues and asynchronous IO
0.291313
0
0
2,039
36,519,225
2016-04-09T16:01:00.000
0
0
0
0
python,speech-recognition,cmusphinx,htk,autoencoder
36,650,716
1
true
0
0
I am not aware of any decoder that could help you. Speech recognition software does not work this way. Usually such thing requires custom implementation for dynamic beam search. That is not a huge task, maybe 100 lines of code. It also depends on what your phonetic decoder produces. Is it phonetic lattice (ideally) or ...
1
0
1
I've implemented a phoneme classifier using an autoencoder (Given an audio file array it returns all the recognized phonemes). I want to extend this project so that word recognition is possible. Does there exist an already trained HMM model (in English) that will recognize a word given a list of phonemes? Thanks everyb...
Already trained HMM model for word recognition
1.2
0
0
354
36,520,287
2016-04-09T17:28:00.000
0
0
1
0
python,linux,input,console
36,520,388
2
false
0
0
Have you tried? myinput = raw_input("Enter your input ->") I am using windows , it works fine. Don't have a linux to simulate. Also, why are you pressing arrow keys? Is it a need for program? You can simply make arrow using a dash and greater than keys.
2
0
0
How can I allow the arrows in raw_input()? There is a better way? When I write and I use the left arrow, ^[[D appears. I am using Linux.
Python raw input with arrows
0
0
0
1,666
36,520,287
2016-04-09T17:28:00.000
3
0
1
0
python,linux,input,console
36,520,529
2
false
0
0
If you are Windows, the cursor keys work normally to allow editing of your input. On Linux, I find that I need to import readline to get the input editing module. If you Google for "python readline" you will get many more hits and suggestions on enhanced editing, tab completion, etc.
2
0
0
How can I allow the arrows in raw_input()? There is a better way? When I write and I use the left arrow, ^[[D appears. I am using Linux.
Python raw input with arrows
0.291313
0
0
1,666
36,521,976
2016-04-09T19:59:00.000
0
0
0
0
python,oauth,oauth2client
36,541,353
1
false
1
0
Update the grant_type to implicit
1
0
0
The standard (for me) OAuth flow is: generate url flow.step1_get_authorize_url() and ask user to allow app access get the code get the credentials with flow.step2_exchange(auth_code) But I faced with another service, where I just need to initiate a POST request to token_uri with client_id and client_secret passed as ...
How to get OAuth token without user consent?
0
0
1
106
36,524,836
2016-04-10T01:50:00.000
12
0
1
0
python,list,append,operators,extend
36,524,869
1
true
0
0
In python += on a list is equivalent to extend method on that list.
1
3
0
Python lists have a += operator as well as append and extend methods. If l is a list, is l += ... equivalent to l.append(...), l.extend(...), both, or neither?
Is a Python list's += operator equivalent to append() or extend()?
1.2
0
0
5,701
36,526,219
2016-04-10T05:33:00.000
2
0
0
0
sql-server,web-services,ironpython,spotfire
36,533,707
2
false
0
0
Shadowfax is correct that you should review the How to Ask guide. that said, Spotfire offers this feature in two ways: use IronPython scripting attached to an action control to retrieve the data. this is a very rigid solution that offers no caching, and the data must be retrieved and placed in memory each time the doc...
1
0
0
There is a use case in which we would like to add columns from the data of a webservice to our original sql data table. If anybody has done that then pls do comment.
How to use a web service as a datasource in Spotfire
0.197375
1
0
959
36,529,242
2016-04-10T11:41:00.000
3
0
1
0
python,kivy
36,529,332
1
true
0
1
It has nothing to do with kivy, these are basics of python language. Instead of overwriting the varliable with = sign, use += to append.
1
0
0
Is there a way to insert text to a textinput without overwriting the previous text? Textinput().text = "something" deletes the previous text.I also want to add it everytime in a new line.
Insert text to TextInput() in Kivy
1.2
0
0
799
36,531,637
2016-04-10T15:26:00.000
0
0
0
0
python,linux,libreoffice,libreoffice-writer
36,532,645
3
true
0
0
Macros for OpenOffice/LibreOffice in Python don't have to be executable. The location is right, though you might want to create a sub-directory (e.g. for CALC or WRITER), and put it in there - since otherwise it will be visible in all other components (where it might not work). Did you restart LibreOffice after copyi...
2
1
0
I'm trying to learn to write macros for LibreOffice in Python. I made simple macro, put in into ~/.config/libreoffice/4/user/Scripts/python/ and found it in Tools/Macros/Organize Macros/Python.../My Macros. So far all works as expected, macro is visible. But when I click on it, the Run button stays grayed out. I cann...
Can't run Python macro in LibreOffice
1.2
0
0
1,419
36,531,637
2016-04-10T15:26:00.000
0
0
0
0
python,linux,libreoffice,libreoffice-writer
39,428,308
3
false
0
0
Note: For LO 5.2 you need to put your pythons here.. /opt/libreoffice5.2/share/Scripts/python .. or better still place a link there into a folder where you can edit without sudo ie. issue a command like this.. cd /opt/libreoffice5.2/share/Scripts/python sudo ln -s /home/rich/Sources/Pythons rje_pythons where /home/rich...
2
1
0
I'm trying to learn to write macros for LibreOffice in Python. I made simple macro, put in into ~/.config/libreoffice/4/user/Scripts/python/ and found it in Tools/Macros/Organize Macros/Python.../My Macros. So far all works as expected, macro is visible. But when I click on it, the Run button stays grayed out. I cann...
Can't run Python macro in LibreOffice
0
0
0
1,419
36,532,089
2016-04-10T16:05:00.000
2
0
0
0
python,opencv,rotation
36,532,299
2
false
0
0
Yes, it is possible for the initial pixel value not to be found in the transformed image. To understand why this would happen, remember that pixels are not infinitely small dots, but they are rectangles with horizontal and vertical sides, with small but non-zero width and height. After a 13 degrees rotation, these rect...
2
0
1
Is it possible the value pixel of image is change after image rotate? I rotate an image, ex, I rotate image 13 degree, so I pick a random pixel before the image rotate and say it X, then I brute force in image has been rotate, and I not found pixel value as same as X. so is it possible the value pixel can change after ...
pixel value change after image rotate
0.197375
0
0
1,412
36,532,089
2016-04-10T16:05:00.000
-1
0
0
0
python,opencv,rotation
36,532,213
2
true
0
0
If you just rotate the same image plane the image pixels will remain same. Simple maths
2
0
1
Is it possible the value pixel of image is change after image rotate? I rotate an image, ex, I rotate image 13 degree, so I pick a random pixel before the image rotate and say it X, then I brute force in image has been rotate, and I not found pixel value as same as X. so is it possible the value pixel can change after ...
pixel value change after image rotate
1.2
0
0
1,412
36,536,019
2016-04-10T21:58:00.000
0
0
0
1
python,intellij-idea
36,536,584
1
false
0
0
You can always put your .idea folder into .gitignore (or equivalent for your VS) file and prevent sharing it between systems and developers. If you don't have project-specific settings there - it's recommended way to do it.
1
0
0
I have an Intellij 15 Python project created using the Python plugin. I'm on OSX and have the Project Python SDK set to /usr/bin/python. I've got another developer on my team that is on Windows and his SDK is at C:\Python27\Python.exe Is there any way I can share this project via source control without us both stepping...
Share an Intellij Python Project Between Windows and OSX
0
0
0
22
36,538,401
2016-04-11T01:22:00.000
0
0
1
0
python
36,538,487
1
false
0
0
I think simplest answer is - to open another temporary file for writing. Read 1200 characters at a time (read in an array and directly compare the bytes at offset you mention). If your condition is true, write to the temp file or else do nothing. Rename the temp file to your file once you are done reading the file. Som...
1
0
0
I have a text file. The text file is very large, about 6 million lines, but I need only a relatively small subsection of that file. The file is divided into chunks of about 1200 characters. I need to see whether characters 921-922 of each chunk correspond to five different numbers. If they don't, I need the entire chu...
Removing sections of a text file given a specific value for a character
0
0
0
26
36,538,637
2016-04-11T01:54:00.000
0
0
1
0
python
46,259,141
2
false
0
0
The diffrence depend on what module you use. If you use from socket import socket, AF_INET, SOCK_STREAM : This will work. s will be uninitialized socket object. Will not work, because socket is constructor and not a module. This will work. s will be initialized socket object. If you use import socket : Will not wor...
1
0
0
I'm having some trouble understanding the variant syntax format when creating sockets (I've started learning Python a few weeks ago). Can someone please explain what is the difference (if any) between the below? s = socket() s = socket.socket() s = socket(AF_INET, SOCK_STREAM) Thanks.
Difference in socket syntax
0
0
1
58
36,540,220
2016-04-11T05:06:00.000
0
1
0
0
android,python,python-appium
59,561,249
1
false
1
0
You need to create multiple Udid and modify the same in the code.Inorder to launch in multiple devices you need to create multiple instances of appium server opening in Different ports(eg.4000,4001....etc)
1
1
0
I am trying Appium using Python language. I have written a simple Login script in Python,it executes perfectly in one android device/emultor using Appium. But i have no idea how to run in multiple device/emulators..i read some forums but did not get any solutions(i am very new to Automation-Appium). Please help me with...
How to run Appium script in multiple Android device/emulators?
0
0
0
447
36,540,431
2016-04-11T05:27:00.000
0
1
0
0
c#,php,python,sms,sms-gateway
36,540,940
1
false
0
0
If you want to show the image content from the URL all you can do is write a notification Application Which will read from the SMS that you are sending and (using the thirdparty number from which you are sending the sms) and notify the user with image (by reading the content of the SMS and downloading it from URL). Bu...
1
0
0
I am using 3rd party to send and receive SMS, which includes text plus url of image. Is there any way that latest smartphones shows picture instead of link? Like the downloadable content.
SMS with picture link
0
0
1
107
36,542,813
2016-04-11T07:50:00.000
-2
1
0
0
python,twitter,tweepy
36,543,167
1
false
0
0
Yes you can track it. Get the stats(favorite, retweet_count) of your retweet(time when you are retweeting it.) and save this stats somewhere as a check-point. Next time when someone is going to retweet it again you will get an updated stats of the your previous retweet and do compare latest stats with the existing chec...
1
3
0
If I retweet a tweet, is there a way of finding out how many times "my retweet" has been retweeted / favorited? Are there provisions in the Twitter API to retrieve that? There is no key in retweeted_status which gives that information. What am I missing here?
Find the number of retweets of a retweet using Tweepy?
-0.379949
0
1
1,191
36,549,300
2016-04-11T12:54:00.000
2
0
0
0
python,django,unicode,django-rest-framework,content-type
36,549,592
1
false
1
0
You likely miss the system language settings available within Django. Depending on your stack (apache or supervisor do remove default system settings) you will need to define it explicitly. The reason is, unicode is for Python internal specific. You need to encode the unicode into an output format. Could be utf8, or an...
1
1
0
I am trying to display a unicode value u'\u20b9' from my SQLite database, using the browsable API of django-rest-framework 3.1.3 I don't get the expected value ₹ for currency_symbol, it returns the following, depending on the browser: Chrome 49.0.2623.110 (64-bit): Browsable API: "" (Blank String) JSON: "₹" Safari...
Unicode not rendering in Django-Rest-Framework browsable API in Chrome
0.379949
0
0
256
36,552,029
2016-04-11T14:48:00.000
3
0
0
0
python,flask,formatting,pygal
36,914,709
1
true
0
1
graph.value_formatter = lambda y: "{:,}".format(y) will get you the commas. graph.value_formatter = lambda y: "${:,}".format(y) will get you the commas and the dollar sign. Note that this formatting seems to be valid for Python 2.7 but would not work on 2.6.
1
2
0
I'm using Pygal (with Python / Flask) relatively successfully in regards to loading data, formatting colors, min/max, etc., but can't figure out how to format a number in Pygal using dollar signs and commas. I'm getting 265763.557372895 and instead want $265,763. This goes for both the pop-up boxes when hovering over...
Properly formatting numbers in pygal
1.2
0
0
784