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
27,138,752
2014-11-25T23:31:00.000
1
0
0
0
python,machine-learning,scikit-learn,pmml
27,368,753
1
true
0
0
Since the PMML representation of the Naive Bayes model implements representing joint probabilities via the "PairCounts" element, one can simply replace that ratio with the probabilities output (not the log probability). Since the final probabilities are normalized, the difference doesn't matter. If the requirements inv...
1
0
1
I am trying to build my own pmml exporter for Naive Bayes model that I have built in scikit learn. In reading the PMML documentation it seems that for each feature vector you can either output the model in terms of count data if it is discrete or as a Gaussian/Poisson distribution if it is continous. But the coeffici...
naive bayes feature vectors in pmml
1.2
0
0
170
27,139,271
2014-11-26T00:21:00.000
1
1
0
1
python,amazon-web-services,ssh,amazon-ec2,amazon-elastic-beanstalk
27,139,451
2
true
0
0
Hi you have to declare the keypair to use on the web console. Go to elasticbeanstalk > your application > edit configuration > Instances > select keypair Alternatively, this sounds like a hack but you can write a python script file that call for the modules that you installed and throws an error if the module is not ...
1
1
0
I am using python and Amazon EC2 I am trying to progrmamtically SSH into the instance created by the Elastic Beanstalk Worker. While using 'eb init' there is no option to specify the KeyPair to use for the instance and hence I am not able to SSH into it. Reason for me to do this is that I want to check if the dependenc...
SSH into EC2 Instance created by EBS
1.2
0
0
723
27,142,550
2014-11-26T06:19:00.000
0
1
0
0
python,active-directory,windows-server-2008-r2,domainservices
27,160,376
1
true
0
0
Whenever I have seen that error before it has normally just required the machine in question to be removed from the domain and joined back to it again. So if it just one computer then I would suggest trying that first of all.
1
0
0
I have very basic question here... I have a situation where friend of mine claims that he has a parent child domains created. As they are parent child domains there is two way transitive trust created by default... But when I try to run Python application which internally calls win32security.LookupAccountName("", Local...
win32security.LookupAccountName fails with error The trust relationship between the primary domain and the trusted domain failed
1.2
0
0
902
27,145,014
2014-11-26T09:05:00.000
0
0
1
0
javascript,python,processing
49,843,328
1
false
1
0
At the moment there is no straightforward way to do this. But some workarounds can be found. For example, since Processing's python mode is using Jython language (Python on JVM) you can do the following: Compile the Jython code to Java bytecode Decompile Java bytecode to real Java code Use processing.js to make the sk...
1
4
0
The title says it all. I spent a lot of time designing a sketch in Processing using the Python language. Now, I would like to put the sketch on a webpage. Of course, I could just translate the sketch from python language to javascript and use a javascript library for processing. However, this would be a very lengthy pr...
Is there a way to integrate a processing sketch written in Python in a webpage?
0
0
0
144
27,145,789
2014-11-26T09:43:00.000
0
0
1
0
python,algorithm,mathematical-optimization,knapsack-problem,greedy
27,156,673
4
false
0
0
This problem can be phrased as a zero-one assignment problem, and solved with a linear programming package, such as GLPK, which can handle integer programming problems. The problem is to find binary variables x[i] such that the sum of x[i]*w[i] is as large as possible, and less than the prescribed limit, where w[i] are...
1
0
1
How to find biggest sum of items not exceeding some value? For example I have 45 values like this: 1.0986122886681098, 1.6094379124341003, 3.970291913552122, 3.1354942159291497, 2.5649493574615367. I need to find biggest possible combination not exceeding 30.7623. I can't use bruteforce to find all combinations as amou...
How to find biggest sum of items not exceeding some value?
0
0
0
1,217
27,146,262
2014-11-26T10:06:00.000
0
0
1
0
python,configuration,argparse
66,471,482
7
false
0
0
found a very simple solution : vars(args) will transform it into a dict object.
1
14
0
I'm using argparse module to set my command line options. I'm also using a dict as a config in my application. Simple key/value store. What I'm looking for is a possibility to override JSON options using command line arguments, without defining all possible arguments in advance. Something like --conf-key-1 value1 --con...
Create variable key/value pairs with argparse (python)
0
0
0
19,341
27,152,414
2014-11-26T15:04:00.000
229
0
1
0
python,sublimetext2,pycharm
27,168,576
3
true
0
0
I think you want something like Settings | Editor | General | Smart Keys -> Surround selection on typing quote or brace
1
126
0
Is there a way to configure PyCharm to be able to surround selected code with parenthesis by just typing on the parenthesis key, like when we use SublimText 2?
How to surround selected text in PyCharm like with Sublime Text
1.2
0
0
28,935
27,152,624
2014-11-26T15:14:00.000
1
0
0
0
python-2.7,image-processing,plot,scikit-image
27,156,595
1
true
0
0
See skimage.feature.plot_matches, pass empty list of keypoints and matches if you only want to plot the images without points.
1
3
1
Looking up at different feature matching tutorials I've noticed that it's tipical to illustrate how the matching works by plotting side by side the same image in two different version (one normal and the other one rotated or distorted). I want to work on feature matching by using two distinct images (same scene shot fr...
Plot two images side by side with skimage
1.2
0
0
722
27,154,325
2014-11-26T16:34:00.000
10
0
1
0
python,windows,dll,clr
27,154,618
2
false
0
0
If you have Microsoft Visual Studio available, 1) open the Visual Studio project that your DLL is part of (or create a new project). 2) If you have set up your DLL for debugging (you've built it with debugging info, and it will be the one that your python program will use), you can set breakpoints in the DLL code. 3)...
1
6
0
On Windows7 I have a python script that uses Windows DLLs, using the .NET Common Language Runtime (CLR). An error occurs inside one of the used DLL, but the standard Python debugger only debugs on the Python code level (and not the DLL). How can I debug what is going on inside the DLL(s)?
How to debug a Windows DLL used inside Python?
1
0
0
4,688
27,154,600
2014-11-26T16:48:00.000
1
0
1
0
python,regex,match
27,154,695
2
false
0
0
You are almost there. Try this: ([a-zA-Z]{2} ){1,4}[a-zA-Z]{2}
1
2
0
I'm using regex to find occurrences in a string python, for example: "cw cx", "cw cx av", "cw cx dr wt" or "cw cx qw hv eb". The match can be 2, 3, 4 or 5 pairs. I'm thinking something like this "([a-zA-Z]{2}) ([a-zA-Z]{2})" Please help me
how can I search letter pairs matches with regex?
0.099668
0
0
147
27,157,087
2014-11-26T19:10:00.000
0
0
1
0
python,numpy,save,append
27,238,940
1
false
0
0
Thanks for your thoughts. These two options came to my mind too but I need the mixture of both: My specific use case requires the file to be human readable - as far as I know pickling does not provide that and saving to a dictionary destroys the order. I need the data to be dropped as they need to be manipulated in oth...
1
0
1
In one run my python script calculates and returns the results for the variables A, B, C. I would like to append the results run by run, row by row to a human-readable file. After the runs i, I want to read the data back as numpy.arrays of the columns. i | A B C 1 | 3 4 6 2 | 4 6 7 And maybe even access the row ...
Append data to end of human-readable file Python
0
0
0
105
27,157,849
2014-11-26T19:57:00.000
0
0
1
0
python,unicode
27,158,045
2
true
0
0
The text b'\xe6\x88\x91' is the representation of the bytes that are the utf-8 encoding of the unicode codepoint \u6211 which is the character 我. So there is no need in converting something, other than to a unicode string with .decode('utf-8').
1
2
0
I first tried typing in a Unicode character, encode it in UTF-8, and decode it back. Python happily gives back the original character. I took a look at the encoded string, it is b'\xe6\x88\x91'. I don't understand what this is, it looks like 3 hex numbers. Then I did some research and I found that the CJK set starts fr...
How to convert unicode to its original character in Python
1.2
0
0
663
27,160,020
2014-11-26T22:29:00.000
20
0
1
0
python,ipython,ipython-notebook
34,639,159
1
false
0
0
The asterisk next to a cell [*] indicates that the cell is currently executing. While IPython provides each notebook with it's own kernel, there is only one kernel per notebook. When that kernel is busy executing code (either a cell, or a series of cells) it cannot accept or run any further code until what it is curren...
1
18
0
I'm sure this is a very newb question, so I apologize in advance. I'm trying to use ipython notebook for a group project. The program we are building is fairly large and pulls in a large number of external datasets. Much of the time, Ipython seems to stop working. I'll try to run a cell or multiple cells and nothing wi...
Why do Ipython cells stop executing?
1
0
0
14,050
27,161,760
2014-11-27T01:37:00.000
2
0
0
0
python,linux,python-2.7,ubuntu,sqlalchemy
27,371,294
2
true
1
0
To get passed this error I just simply ran the command: sudo easy_install "SQLAlchemy==0.7.8" The virtual environments do seem like the preferred method though, so hopefully I don't run into any additional problems from downgrading system-wide.
1
1
0
I am using Ubuntu 14.04 and trying to run snoopy_auth which is a part of the snoopy-ng application I downloaded and installed from their GitHub. When running, I get an error that is documented on snoopy-ng's GitHub page, which says that it works using version 0.7.8. How can I downgrade sqlalchemy to 0.7.8? The error lo...
How can I remove version 0.9.7 of sqlalchemy and install 0.7.8 instead?
1.2
1
0
1,813
27,162,717
2014-11-27T03:42:00.000
1
0
0
0
python,unit-testing,csv
27,162,750
3
false
0
0
store in a dictionary with corresponding head of csv file as key and first row as values read the second file and check against with dictionary.
1
1
1
For unit testing a method, I want to compare a CSV file generated by that method (the actual result) against a manually created CSV (the expected result). The files are considered equal, if the fields of the first row are exactly the same (i.e. the headers), and if the remaining row contain the same information. The f...
Python: How to check that two CSV files with header rows contain same information disregarding row and column order?
0.066568
0
0
1,472
27,162,982
2014-11-27T04:17:00.000
2
0
0
0
python,django,database,git
27,163,084
1
true
1
0
Follow the following steps to push from local and pull to server. make changes to models.py Use this cmd to add change to git . > git add models.py use this cmd to commit > git commit -m "your message" git push > this will push your local changes to repo. go to sever now. run cmd > git status see if there are any loc...
1
0
0
I have a working Django 1.6 project using sqlite deployed in Digital Ocean, Ubuntu. I use Git to update my project on server side. (Git clone and git pull thereafter) My question is: every time after I update my database locally (e.g. added some new tables), how can I synchronise with the server one? Using git pull res...
How to synchronise local Django sqlite database with the server one?
1.2
1
0
860
27,166,357
2014-11-27T08:43:00.000
1
0
0
0
python,search,curl,elasticsearch
27,177,167
2
false
0
0
the above search example looks correct.Try lowercasing the Data "Analyst" as "data analyst". if doesn't help post your mappings,query you firing and response you are getting.
1
0
1
I have uploaded some data into Elastic server as " job id , job place , job req , job desc ". My index is my_index and doctype = job_list. I need to write a query to find a particular term say " Data Analyst " and it should give me back matching results with a specified field like " job place " . ie, Data Analyst term ...
Elastic Search query filtering
0.099668
1
0
5,426
27,170,958
2014-11-27T12:34:00.000
0
0
1
0
python,python-sphinx
59,568,068
3
false
0
0
I use :py:obj: instead. :py:attr: won't work for me when the property is in another page.
1
16
0
How can I reference a method, decorated with @property? For simple methods, :py:meth: is working fine, but not for properties: it does not create a link to them.
Sphinx documentation: how to reference a Python property?
0
0
0
6,984
27,172,062
2014-11-27T13:40:00.000
0
0
0
1
python,netcat
27,194,201
1
true
0
0
So, I finally found the solution In the shebang, add the option -u to the interpreter to unbuffer stdin stdout and stderr Shebang line: #!usr/bin/python -u
1
0
0
I am starting a basic netcat server with the command nc.traditional -l -e server.py -p 4567 Problem is when I'm connecting to it (telnet 127.0.0.1 4567), the script starts but nothing gets on screen. I have print instructions on the beginning of the script that are read by the interpreter (I tested that it starts via f...
nc.traditional -e script.py Not printing anything
1.2
0
0
136
27,177,721
2014-11-27T19:37:00.000
1
0
0
0
python-3.x,tf-idf,lda,topic-modeling,gensim
27,378,733
1
false
0
0
id2word must map each id (integer) to term (string). In other words, it must support id2word[123] == 'koala'. A plain Python dict is the easiest option.
1
3
1
I have a tf-idf matrix already, with rows for terms and columns for documents. Now I want to train a LDA model with the given terms-documents matrix. The first step seems to be using gensim.matutils.Dense2Corpus to convert the matrix into the corpus format. But how to construct the id2word parameter? I have the list of...
Training a LDA model with gensim from some external tf-idf matrix and term list
0.197375
0
0
505
27,177,999
2014-11-27T20:00:00.000
3
0
0
0
python,flask,socket.io
50,516,756
3
false
0
0
Consider using request.sid which gets its value populated from the FlaskSocketIO library.
1
8
0
Is there a way to get socket id of current client? I have seen it is possible to get socket id in node.js. But it seems flask's socket.io extension is a little bit different than node's socketio.
getting socket id of a client in flask socket.io
0.197375
0
1
10,949
27,183,298
2014-11-28T06:43:00.000
0
0
0
0
python,pycharm
27,185,315
1
false
0
0
This has been solved by updating to Django 4.0.1 from Django 4.0
1
0
0
I recently posted a question which gave me the answer that I needed to set my path mappings. This currently doesn't work, and I can't figure out why. Clicking on the... doesn't open up anything, and the textbox is disabled. Could anyone suggest why it might not work? thanks.
In PyCharm 4 Professional, why can't i set path mappings?
0
0
0
209
27,186,207
2014-11-28T10:04:00.000
5
0
1
0
python,python-3.x,python-venv
27,188,184
1
false
0
0
Nope, commands installed in ./bin have fixed paths in shabang lines.
1
12
0
As of python 3.3 the stdlib has the venv module for creating virtual environments. Are python 3.x venv environments relocatable?
Are python 3.x venv environments relocatable?
0.761594
0
0
2,189
27,192,467
2014-11-28T16:11:00.000
3
0
0
0
python,random,spatial,coordinate
27,192,613
1
true
0
1
There's a lot that's unspecified in your question, such as what distribution you want to use. For the sake of this answer, I'll assume a uniform distribution. The straightforward way to handle an arbitrary volume uniform distribution is to choose three uniformly random numbers as coordinates in the range of the boundin...
1
0
1
I would like to generate a uniformly random coordinate that is inside a convex bounding box defined by its (at least) 4 vertices (for the case of a tetrahedron). Can someone suggest an algorithm that I can use? Thanks! If a point is generated in a bounding box, how do you detect whether or not it is outside the geomet...
Generate a random point in space (x, y, z) with a boundary
1.2
0
0
1,463
27,192,852
2014-11-28T16:35:00.000
1
0
0
1
python,hadoop,apache-spark
27,195,171
1
false
0
0
First and foremost what are you trying to achieve? What does running on Hadoop technology mean to you? If the goal is to work with a lot of data, this is one thing, if it's to parallelize the algorithm, it's another. My guess is you want both. First thing is: is the algorithm parallelizable? Can it run on multiple piec...
1
0
1
I am having an algorithm written in python (not hadoop compatible i.e. not mapper.py and reducer.py) and it is running perfectly in local system (not hadoop). My objective is to run this in hadoop. Option 1: Hadoop streaming. But, I need to convert this python script into mapper and reducer. Any other way? Option 2:...
To run python script in apache spark/Storm
0.197375
0
0
1,217
27,192,905
2014-11-28T16:39:00.000
1
0
1
0
ipython,ipython-notebook
27,229,741
3
true
0
0
I didn't find how to get the previous content cell in a cell. But I found another solution, creating a custom magic notebook function to capture the cell content and work with that.
1
5
0
Is it possible in an IPython-Notebook cell to get the previous (above) cell content ? I can see previous output with %capture magic function but I don't find how to get the previous cell content.
IPython Notebook previous cell content
1.2
0
0
3,415
27,193,835
2014-11-28T17:56:00.000
0
1
0
0
qpython
27,197,253
2
false
0
1
The comment from Yulia V got me thinking, maybe I just needed to append the location of "Scripts" to the sys.path, and Yep, that worked fine!! Thanks Yulia!
2
0
0
With QPython on Kindle fire .. I use QEdit to write & save a .py file .. say bob.py .. But when I switch to Console, I can't IMPORT from bob .. Can someone tell me how to do this? John (new to QPython)
How to import from saved QPython file?
0
0
0
1,136
27,193,835
2014-11-28T17:56:00.000
0
1
0
0
qpython
27,209,867
2
false
0
1
I think you can save the module file into the same directory which you script locates or /sdcard/com.hipipal.qpyplus/lib/python2.7/site-packages/
2
0
0
With QPython on Kindle fire .. I use QEdit to write & save a .py file .. say bob.py .. But when I switch to Console, I can't IMPORT from bob .. Can someone tell me how to do this? John (new to QPython)
How to import from saved QPython file?
0
0
0
1,136
27,193,849
2014-11-28T17:57:00.000
5
0
0
0
python,multithreading,sqlalchemy
27,194,059
1
true
1
0
Session.merge() is enough and should do what you're after, but even then it gets fiddly with threads. You might want to rethink this. Pass the primary key(s) to the worker instead of the objects, and then handle object loading and the actual work in the worker itself. No messing around with threading and open/closed se...
1
2
0
I'm working on a multithreaded application that uses the SQLAlchemy ORM. It already uses scoped_session with the thread as its scope, but we are having some issues when we pass an ORM object from a worker thread back to the main thread. Since the objects are attached to the worker thread's session, when the worker thre...
SQLAlchemy ORM: safely passing objects between threads without manually reattaching?
1.2
1
0
1,254
27,194,932
2014-11-28T19:32:00.000
2
1
1
0
python
30,282,342
2
false
0
0
You run your .py files just like you would if you were running the python commandline in windows. ex. python myfile.py Open a SSH terminal from your python devbox and type it in the cmd line and you're all set.
1
2
0
I just started with learning Python 3.4.x. I really want to keep learning and developing on all devices. That's why I'm using Codeanywhere. But the problem is I don't know how to execute a .py file in Codeanywhere. Is there a method to do it? Thanks
How do I run python in Codeanywhere?
0.197375
0
0
9,516
27,196,501
2014-11-28T22:07:00.000
0
0
1
0
python,formatting,tabular
27,209,158
2
false
0
0
My shell has the font settings changed so the alignment was off. Back to font: "Courier" and everything is working fine. Sorry.
1
1
0
Right now I'm using print(), calling the variables I want that are stored in a tuple and then formatting them using: print(format(x,"<10s")+ format(y,"<40s")...) but this gives me output that isn't aligned in a column form. How do I make it so that each row's element is aligned? So, my code is for storing student detai...
Format strings to make 'table' in Python 3
0
1
0
5,713
27,196,845
2014-11-28T22:47:00.000
0
0
0
0
python,django,python-2.7
27,198,456
1
true
1
0
It turns out that for my purposes, I needed to be calling my custom commands from within another custom command file. My intent was to have one file that would call my other custom commands and this wasn't working with just a regular Python file. As soon as I made this regular Python file into another custom command ...
1
1
0
I have a custom django admin call that I am able to successfully call from the command line using: python manage.py mycustomcommand. Therefore, the directories are setup with the necessary init files in 'management' and 'commands' folders, and I have listed the apps under INSTALLED_APPS in my settings file. When I t...
Django custom command works on command line, but not call_command
1.2
0
0
591
27,198,697
2014-11-29T03:58:00.000
1
0
1
0
python,linux,sockets,video,udp
27,199,731
1
true
0
0
If you are to send a video(with audio) to a peer in the network, you would better use RTP(Real time Transfer Protocol) which works on top of UDP. RTP provides feature of timestamps and profile which help you syncronize the audio and video sent through two ports.
1
0
0
I am doing a project on media (more like a video conferencing). The problem is , although I am able to send text/string data from one peer to another, I am still not sure about video files. Using gstreamer, I am able to capture video stream from my webcam and doing the encoding/coding (H.264) , I am able to write the ...
python - how to have video file(data) into list?
1.2
0
1
73
27,198,906
2014-11-29T04:35:00.000
1
0
1
0
python
27,198,951
5
false
0
0
You can make class with attributes as units and values. Another possible solution to this can be using dictionary {a: 'm/s', b: 'm^2'} Or two lists if duplicate values can occur myVars = [a, b, 100, d] myUnits = ['m/s', 'm^2', 's', 'm'] Then myResult = str(myVars[0]) + str(myUnits[0])
1
2
0
I want to know if it is possible to add an attribute to a variable in python. For example create the variable a=45 and then add as a label or property something like units=m/s Thank you.
Is it possible to add an attribute to a variable in python?
0.039979
0
0
284
27,204,134
2014-11-29T15:58:00.000
0
1
0
0
python,serialization,raspberry-pi
64,522,252
3
false
0
0
It's the cable. Check the USB cable. All of that yanking
1
1
0
I'm making a code where the pi gets a serial input from a usb-serial board(From the sparkfun RFID starter kit), how can I make this work? error Traceback (most recent call last): File "main", line 22, in ser = s.Serial('ttyUSB0', 9600, timeout=10000) File "/usr/lib/python2.7/dist-packages/serial/serialutil....
ttyUSB0 not found on Raspberry Pi
0
0
0
9,230
27,204,135
2014-11-29T15:58:00.000
3
0
1
0
python,pycharm,kivy
27,204,313
2
false
0
0
Did you install kivy in your system from the zip, using the setup.py file in it?. I had a similar problem, which was because I hadn't installed it properly and using it in portable mode.
1
4
0
I am a Mac-based Pycharm Python developer. It seems like I can't use Pycharm to develop using the Kivy framework because there is no official support. While choosing the path: /usr/local/bin/kivy as the interpreter path, an error message: Invalid python interpreter name{0} appears. How can I use Kivy in Pycharm?
Setting Kivy in Pycharm (Mac)
0.291313
0
0
772
27,207,643
2014-11-29T22:02:00.000
1
0
0
0
python,performance,tkinter,syntax-highlighting,lexical-analysis
27,210,959
1
false
0
1
One possible answer is to do something like Idle does. As a user hits each key, its custom incremental parser tags identifiers that are a keyword, builtin, or def/class name*. It also tags delimited char sequences that are a string or comment. I does what can be done quickly enough. For example, if one types printer ...
1
0
0
I'm trying to implement syntax highlighting for text in a Text widget. I use an external library to lexically analyse the text and give me the tokenised text. After that I go over all the words in the text and apply tag to their position in the text widget so that I can style each word. My concern now is how do I dea...
Efficiently applying text widget tags in tkinter text widgets
0.197375
0
0
228
27,208,748
2014-11-30T00:34:00.000
3
0
1
0
python,python-2.7,if-statement,any
27,208,777
2
false
0
0
item.isdigit() should be char.isdigit().
1
1
0
I have a problem with the Python function any(). I want to use the any() function to remove from a list any items that contains a digit. For instance: lst = ['abc123','qwerty','123','hello'] and I apply the following code to remove from lst the items: 'abc123','123' new_list = [item for item in lst if not any(item.isdi...
Python: Issues with "if not any"
0.291313
0
0
2,547
27,208,926
2014-11-30T01:01:00.000
1
0
0
0
c#,.net,dll,ironpython
27,233,826
1
true
1
1
You can try replicating what "works for me". Create a solution containing: python project (ironpython) C# project Add a reference to desired oracle library (Oracle.DataAccess.dll) to C# project using the standard VS mechanism. C# project should also contains a post build step to copy the resulting dll and pdb into th...
1
0
0
I want to debug separate pieces of my application in Visual Studio 2012. I have C# executable which works with Oracle.DataAccess dll. It works fine. Within it IronPython runtime is invoked and it works fine too. Within these IronPython modules object from main C# application is invoked and it works fine with Oracle dll...
DLL loading (C#/IronPython/C#) in VS2012
1.2
0
0
390
27,210,351
2014-11-30T05:29:00.000
0
0
1
0
python,python-3.x,installation
27,210,767
4
false
0
0
(In addition to Owens points). Use py2exe or one of the other exe builder utils for python on windows. On other platforms just use the python script.
1
4
0
I have an installer which uses a Python script to install several components. I do not want to install Python on the users computer if they do not already have it and I also do not want having Python installed to be a prerequisite for using my installer. Is there a way of downloading Python without using the installer ...
Use Python without installing
0
0
0
23,388
27,214,104
2014-11-30T14:06:00.000
0
0
0
1
python,django,google-app-engine
27,214,235
2
false
1
0
You can hardly hide the secret keys from an attacker that can access your server, since the server needs to know the keys. But you can make it hard for an attacker with low privileges. Obfuscating is generally not considered as a good practice. Your option 5 seems reasonable. Storing the keys in a non-source controlled...
2
7
0
I have a Django app that uses some secret keys (for example for OAuth2 / JWT authentication). I wonder where is the right place to store these keys. Here are the methods I found so far: Hardcoding: not an option, I don't want my secrets on the source control. Hardcoding + obfuscating: same as #1 - attackers can just r...
Storing client secrets on Django app on App Engine
0
0
0
812
27,214,104
2014-11-30T14:06:00.000
0
0
0
1
python,django,google-app-engine
37,824,536
2
false
1
0
A solution I've seen is to store an encrypted copy of the secret configuration in your repository using gpg. Depending on the structure of your team you could encrypt it symmetrically and share the password to decrypt it or encrypt it with the public keys of core members / maintainers. That way your secrets are backed ...
2
7
0
I have a Django app that uses some secret keys (for example for OAuth2 / JWT authentication). I wonder where is the right place to store these keys. Here are the methods I found so far: Hardcoding: not an option, I don't want my secrets on the source control. Hardcoding + obfuscating: same as #1 - attackers can just r...
Storing client secrets on Django app on App Engine
0
0
0
812
27,215,170
2014-11-30T16:04:00.000
4
0
1
0
python,anaconda
27,239,565
1
true
0
0
There is no need to remove your system Python. Anaconda sits alongside it. When it installs, it adds a line to your .bashrc that adds the Anaconda directory first in your PATH. This means that whenever you type python or ipython in the terminal, it will use the Anaconda Python (and the Anaconda Python will automaticall...
1
5
1
I've been installing few Library/Toolkit for Python like NLTK, SciPy and NumPy on my Ubuntu. I would like to try to use Anaconda distribution though. Should I remove my existing libraries before installing Anaconda?
Integrating exisiting Python Library to Anaconda
1.2
0
0
3,390
27,217,051
2014-11-30T19:08:00.000
0
0
0
0
python,opengl,webgl,ipython,vispy
27,259,240
1
true
0
0
This looks like a good use-case for Vispy indeed. You'd need to use a PointVisual for the nodes, and a LineVisual for the edges. Then you can update the edges in real time as the simulation is executed. The animation would also work in the IPython notebook with WebGL. Note that other graphics toolkits might also work f...
1
0
1
So I have a particular task I need help with, but I was not sure how to do it. I have a model for the formation of ties between a fixed set of network nodes. So I want to set up a window or visualization that shows the set of all nodes on some sort of 2-dimensional or 3-dimensional grid. Then for each timestep, I want ...
network animation with static nodes in python or even webgl
1.2
0
0
308
27,217,237
2014-11-30T19:26:00.000
0
0
0
0
python,django,python-2.7,django-templates,django-views
27,217,307
2
false
1
0
You can try using custom tags in django templates.
1
0
0
http://www.example.com/soe/?param1=val1 this is current url and I want to access variable {{param1}} in django template. (Django 1.7) I know there are already many threads available for this problem but all of them are using ContextProcessor.(or render_to_response) I'm simply using return render(request, template, {})...
Access URL parameters in django 1.7 template without using context processors
0
0
0
815
27,217,401
2014-11-30T19:43:00.000
1
0
0
0
java,python,operators
57,453,225
4
false
1
0
One thing to notice is: in python 3: 6 // -132 = -1 in java: 6 / -132 = 0
1
2
0
Is there a form of the // operator that is used in python that I can use in java, or some sort of workaround? 10 // 3 = 3
Operator in Java like // in python?
0.049958
0
0
2,327
27,217,584
2014-11-30T19:59:00.000
2
0
0
0
python,django,database-design,design-principles
27,220,032
1
false
1
0
First, if you want to use email as username, use the Django custom user functionnality. It works well. Then, note that it's not because you created your own User that you can't extend it with a Profile. So, a good solution could be : Create a Django custom User without trying to add specific fields to it (the one and ...
1
3
0
Probably some of you would tell that is a recurrent topic, but after reading many articles, it still seems very ambiguous to me. My question is about the best way to use and to extend the User model preserving the authentication (and others) mechanisms available in Django. However, I prefer to describe my design: Th...
Django best user model design
0.379949
0
0
603
27,218,696
2014-11-30T21:54:00.000
0
0
1
0
python,unicode
27,218,864
3
false
0
0
Do re.search(r'\d+ Seconds',myString), and then remove Seconds from the output using output.replace(' Seconds','').
1
0
0
I am new to python and I am having issues with a unicode string Here is my string: u'3 hrs, 12 mins, 56 secs (11576 Seconds)' I am trying to pull out the number of seconds for use in another function. I was trying to use re.search() but was having difficulty. Can someone please suggest a way to do this? Thanks C
Python re.search unicode parsing
0
0
0
193
27,218,894
2014-11-30T22:14:00.000
0
0
1
0
java,python,c,algorithm,gray-code
32,443,234
9
false
0
0
An obvious answer, but it works. Convert each gray code into its respective Binary form, subtract the two. If you answer is a binary equivalent of +1 or -1 then the two gray codes are adjacent. This seems like an over kill, but when you're siting in an interview and don't know the correct method, this works. Also to ...
1
6
0
I am trying to come up with a solution to the problem that given two numbers, find if they are the consecutive numbers in the gray code sequence i.e., if they are gray code neighbors assuming that the gray code sequence is not mentioned. I searched on various forums but couldn't get the right answer. It would be great...
How to find if two numbers are consecutive numbers in gray code sequence
0
0
0
17,392
27,221,954
2014-12-01T05:00:00.000
1
0
1
0
python,c++,parsing,python-3.x
27,221,965
2
false
0
0
Clang has an API that can be used for code completion and more, AFAIK, with python bindings.
1
1
0
I'm looking to parse c++ code files in python. I'm mostly concerned with only the function declarations, not the definitions. The kind of output GCCXML gives seems perfect to me but the thing is I can't get GCCXML to work, I can't find proper documentation. All the articles I found online are old and possibly outdated....
parsing c++ in python
0.099668
0
0
143
27,225,181
2014-12-01T09:22:00.000
0
0
0
0
python,django
27,225,478
2
false
1
0
You need to keep checking the socket connection status continuously in a script that will inform you regarding the same. In case you are more concerned with the performance issues then you can make use of a in memory caching system like redis etc. cheers :-)
1
0
0
I want to show instant error page when database host is unavailable. Default behavior for django is that ,when user requests , it takes long time and then displays error page. Is there is any way to display some error instantly when database host is unreachable or database host is invalid with django without any delay ...
Show instant error page when database host is unavailable - django
0
0
0
271
27,226,551
2014-12-01T10:39:00.000
1
1
0
1
python,perl,ubuntu,automation,perl-module
27,242,918
1
false
0
0
The main thing to understand is that each tab has a different instance of terminal running, more importantly a different instance of shell (just thought I would mention as it didnt seem like you were clear about that from your choice of words). So "passing control" in such a scenario could most probably entail inter-pr...
1
0
0
I am trying to automate a scenario in which, I have a terminal window open with multiple tabs open in it. I am able to migrate between the tabs, but my problem is how do i pass control to another terminal tab while i run my perl script in a different tab. Example: I have a terminal open with Tab1,Tab2,Tab3,Tab4 open in...
How do i pass on control on to different terminal tab using perl?
0.197375
0
0
134
27,226,833
2014-12-01T10:56:00.000
0
0
1
0
python,debugging,pycharm
27,227,181
1
true
0
0
The classic method is to write a program that reproduces the conditions that lead into the buggy code, without taking a bunch of time -- say, read in the data from a file instead of generating it -- and then paste in the code you're trying to fix. If you get it fixed in the test wrapper, and it still doesn't work in t...
1
0
0
In the PyCharm debugger we can pause a process. I have a program to debug that takes a lot of time before we arrive to the part I'm debugging. The program can be modeled like that: GOOD_CODE -> CODE_TO_DEBUG. I'm wondering if there is a way to.. run GOOD_CODE save the process edit the code in CODE_TO_DEBUG restore t...
How to save python process for debug?
1.2
0
0
66
27,227,971
2014-12-01T12:01:00.000
0
0
1
0
python,file-io,python-multiprocessing
27,228,128
2
false
0
0
You are indeed right, the bottleneck will be disk-IO. However, the only way to really know, is to measure both approaches. If you have influence on the files, you could go for one larger file as opposed to many smaller files.
2
4
0
I intent to use multiprocessing to read a set of small files with multiprocesing capabilities of Python. However this is awkward in some sense to me because if the disk is rotational then the bottle neck is the rotation time and even-though I use multiple processes, total read time should be similar with single process...
Is it meaningful to use multiprocessing to read multiple files with Python?
0
0
0
352
27,227,971
2014-12-01T12:01:00.000
0
0
1
0
python,file-io,python-multiprocessing
27,228,116
2
false
0
0
Your reasoning is sound, but the only way to find out for sure is by benchmarking (that said, it is unlikely that reading many small files in parallel will increase performance over reading them sequentially). I am not entirely sure what you mean by "intertwined reading", but -- unless there are bugs in your code or th...
2
4
0
I intent to use multiprocessing to read a set of small files with multiprocesing capabilities of Python. However this is awkward in some sense to me because if the disk is rotational then the bottle neck is the rotation time and even-though I use multiple processes, total read time should be similar with single process...
Is it meaningful to use multiprocessing to read multiple files with Python?
0
0
0
352
27,234,386
2014-12-01T18:02:00.000
2
0
0
0
python,kivy
27,235,194
2
false
0
1
Set kivy.core.window.Window.size to (800, 600). You can't set it directly in kv, but you could bind it to a button or similar. You would also need to import the Window to kv, using the #:import statement explained in the doc.
1
1
0
I don't find how to force the window size with the kivy language. (ex: 800x600p) Can you help me ? Thanks for reading. PITO2901
Force Window Size Kivy
0.197375
0
0
1,505
27,239,706
2014-12-02T00:09:00.000
3
0
1
0
python,date
27,252,306
2
false
0
0
If there is no year; don't use datetime.date class. date must have year. Either compute date field on the fly everytime you need it if year is present, and/or make self.date property on your custom object to raise an error if it is used for an object without a year.
1
5
0
I have a script that looks at a list of birthdays and then calculates the age. Some birthdays have year, month, day and some only have month, day. For the ones with years, I have dob = date(year, month, day) But for the ones without years, what is the appropriate convention for storing the date, since date() requires a...
Python: Convention for date with no year
0.291313
0
0
2,033
27,241,268
2014-12-02T03:16:00.000
24
0
1
0
python-3.x,pycharm
41,670,055
12
false
0
0
In Pycharm: CMD + , (or Pycharm preferences); Search: "clear all"; Double click -> Add keyboard shortcut (set it to CTRL + L or anything) Enjoy this new hot key in your Pycharm console!
7
22
0
Is there a way to clear the "Run" console in PyCharm? I want a code that delete/hide all the print() made previously. Like the "clear_all" button, but without having to press it manually. I have read that there is a way to do it in a terminal with os.system("cls"), but in PyCharm, it only adds a small square without cl...
Clear PyCharm Run Window
1
0
0
58,712
27,241,268
2014-12-02T03:16:00.000
0
0
1
0
python-3.x,pycharm
58,573,012
12
false
0
0
Just click the trash can icon to the left of the command window and it clears the command history!
7
22
0
Is there a way to clear the "Run" console in PyCharm? I want a code that delete/hide all the print() made previously. Like the "clear_all" button, but without having to press it manually. I have read that there is a way to do it in a terminal with os.system("cls"), but in PyCharm, it only adds a small square without cl...
Clear PyCharm Run Window
0
0
0
58,712
27,241,268
2014-12-02T03:16:00.000
1
0
1
0
python-3.x,pycharm
62,864,343
12
false
0
0
In PyCharm terminal you can type 'cls' just like in linux terminal. For Python Console (where you see the output) assign a shortkey for "clear all" in File -> Settings -> Keymap -> Other -> "Clear all" You can also click somewhere on the PythonConsole -> Right button -> clear. Hope it helps
7
22
0
Is there a way to clear the "Run" console in PyCharm? I want a code that delete/hide all the print() made previously. Like the "clear_all" button, but without having to press it manually. I have read that there is a way to do it in a terminal with os.system("cls"), but in PyCharm, it only adds a small square without cl...
Clear PyCharm Run Window
0.016665
0
0
58,712
27,241,268
2014-12-02T03:16:00.000
0
0
1
0
python-3.x,pycharm
65,587,408
12
false
0
0
In PyCharm 2019.3.3 you can right click and select "Clear All" button.This is deleting all written data inside of the console and unfortunately this is manual.
7
22
0
Is there a way to clear the "Run" console in PyCharm? I want a code that delete/hide all the print() made previously. Like the "clear_all" button, but without having to press it manually. I have read that there is a way to do it in a terminal with os.system("cls"), but in PyCharm, it only adds a small square without cl...
Clear PyCharm Run Window
0
0
0
58,712
27,241,268
2014-12-02T03:16:00.000
0
0
1
0
python-3.x,pycharm
72,250,752
12
false
0
0
If you edit the run configuration you can enable "emulate terminal in output console" and you can use the os.system("cls") line and it will work normally.
7
22
0
Is there a way to clear the "Run" console in PyCharm? I want a code that delete/hide all the print() made previously. Like the "clear_all" button, but without having to press it manually. I have read that there is a way to do it in a terminal with os.system("cls"), but in PyCharm, it only adds a small square without cl...
Clear PyCharm Run Window
0
0
0
58,712
27,241,268
2014-12-02T03:16:00.000
7
0
1
0
python-3.x,pycharm
59,173,412
12
false
0
0
Easy Method: Shortcut: Control K, Right click on terminal and clear Buffer
7
22
0
Is there a way to clear the "Run" console in PyCharm? I want a code that delete/hide all the print() made previously. Like the "clear_all" button, but without having to press it manually. I have read that there is a way to do it in a terminal with os.system("cls"), but in PyCharm, it only adds a small square without cl...
Clear PyCharm Run Window
1
0
0
58,712
27,241,268
2014-12-02T03:16:00.000
1
0
1
0
python-3.x,pycharm
59,848,299
12
false
0
0
You could just do a ("\n" * 100000000), so it'll be impossible to scroll back.
7
22
0
Is there a way to clear the "Run" console in PyCharm? I want a code that delete/hide all the print() made previously. Like the "clear_all" button, but without having to press it manually. I have read that there is a way to do it in a terminal with os.system("cls"), but in PyCharm, it only adds a small square without cl...
Clear PyCharm Run Window
0.016665
0
0
58,712
27,242,453
2014-12-02T05:26:00.000
3
0
0
0
python,active-directory,ldap,windows-server-2012
27,249,499
2
false
0
0
You need to modify the entry after it is created and set the userAccountControl attribute. The userAccountControl attribute is a bit flag. There are a few different enabled states that can be set. 512 - is a default enabled account 67048 - is an enabled account where the password does not expire
1
1
0
I am using ldap module in python to add user to Microsoft 2012 Active Directory. As I am successfully able to add user to the AD, user gets added with next logon and account as disabled options ticked. I tried lot of option to enable the account but not able to do so. Tried option of enabling account while creating use...
Enable Active Directory user account using ldap python
0.291313
0
0
2,653
27,243,455
2014-12-02T06:48:00.000
0
0
0
0
python,layout,pyqt,scrollbar
30,058,134
2
true
0
1
I found I can do this by creating separate QTabBar and QScrollBar widgets that are attached to a QTabWidget and QAbstractScrollArea (I'm using a QListWidget now but I'm sure it'll work for QGraphicsView too) and then putting those widgets in a QVBoxLayout, and then putting the QVBoxLayout next to the QTabWidget/QAbstra...
1
0
0
I have a QGraphicsView in a QTabWidget with its tabs on the left. I want to move the location of the vertical scrollbar of my QGraphicsView to the left side, directly underneath the tabs. Is this possible?
PyQt move vertical scrollbar location in QGraphicsView
1.2
0
0
476
27,245,890
2014-12-02T09:27:00.000
0
0
1
1
python
27,246,214
3
false
0
0
you can use which python command to find what python you are using. This gives the output as path to symlink, you can find the original python by reading the symlink.
1
0
0
It looks like there is more than one Python installed on my mac. Modules installed are not recognized by python interpreter (2.7.6) until I add them to PYTHONPATH. Could anyone show me how I can locate all the Pythons installed on my mac? Thank you
How can I find out what different versions of Python installed on OSX?
0
0
0
132
27,255,560
2014-12-02T17:36:00.000
1
0
0
0
python,machine-learning,language-features,feature-selection
27,256,151
1
true
0
0
You either need to under-sample the bigger class (take a small random sample to match the size of the smaller class), over-sample the smaller class (bootstrap sample), or use an algorithm that supports unbalanced data - and for that you'll need to read the documentation. You need to turn your words into a word vector. ...
1
2
1
I have been trying to build a prediction model using a user’s data. Model’s input is documents’ metadata (date published, title etc) and document label is that user’s preference (like/dislike). I would like to ask some questions that I have come across hoping for some answers: There are way more liked documents than d...
Training a Machine Learning predictor
1.2
0
0
232
27,256,519
2014-12-02T18:34:00.000
1
0
1
0
python,installation,pip
27,256,564
1
false
0
0
You are entering these commands in the Python shell. Exit it, and enter pip install moviepy at the regular command prompt.
1
0
0
i am having problem installing moviepy on my pytho3.4 version on windows. i wrote this code: py -3.4 -m pip install moviepy and got the error: File "<stdin>", line 1 py -3.4 -m pip install moviepy (the pointer is on 2nd 'p' of pip) SyntaxError: invalid syntax tried this: (sudo) pip install moviepy got the error: Fi...
installing moviepy in python3.4 on windows
0.197375
0
0
1,458
27,259,478
2014-12-02T21:38:00.000
4
0
0
0
python,excel,openpyxl
27,280,801
1
true
0
0
In openpyxl cells are stored individually in a dictionary. This makes aggregate actions like deleting or adding columns or rows difficult as code has to process lots of individual cells. However, even moving to a tabular or matrix implementation is tricky as the coordinates of each cell are stored on each cell meaning ...
1
1
0
I'm trying to delete cells from an Excel spreadsheet using openpyxl. It seems like a pretty basic command, but I've looked around and can't find out how to do it. I can set their values to None, but they still exist as empty cells. worksheet.garbage_collect() throws an error saying that it's deprecated. I'm using t...
Delete cells in Excel using Python 2.7 and openpyxl
1.2
1
0
2,658
27,261,392
2014-12-03T00:10:00.000
0
0
1
0
python,return,return-value,multiple-variable-return
27,261,525
5
false
0
0
However, depending on the input given, the function may produce multiple pairs, which will result in the function returning [[a, b], [c, d], [e, f]]. Instead, I would like it to return [a, b], [c, d], [e, f] Can you not just use the returned list (i.e. the list [[a, b], [c, d], [e, f]]) and extract the elements from i...
1
7
0
I know that it is possible for a function to return multiple values in Python. What I would like to do is return each element in a list as a separate return value. This could be an arbitrary number of elements, depending on user input. I am wondering if there is a pythonic way of doing so? For example, I have a functio...
Returning every element from a list (Python)
0
0
0
48,754
27,264,051
2014-12-03T05:06:00.000
2
0
0
0
python,python-3.x,tkinter,pygame
27,306,611
1
false
0
1
I have not implemented the solution to this particular problem personally, but I will try to suggest one. Of course any of the solutions will slow down your programm cardinally, but technically it is possible. So what is probably worth trying, that you could use pygame.image.tostring() on you current frame, then just w...
1
7
0
I'd like to add a feature where a user can record a video of the game that they're playing. How do I do this?
How do you record a "game" (PyGame or Tk) into a video?
0.379949
0
0
2,016
27,267,159
2014-12-03T08:46:00.000
1
0
0
0
python,linux,psutil,cpu-load
27,490,136
1
false
0
0
Yes, psutil.cpu_times_percent() should reflect the same timings as shown by 'top' but of course they cannot be exactly the same, just approximately the same.
1
3
0
I'm writing a program that will perform some logging of my company's webserver load. One information I need to log is the server's CPU Load. I know that CPU Load -- in monit or top/htop -- reflects the total load across cores, normalized against 1 core. So, for an 8 core server, the total load (when it's heavily loaded...
Python's psutils -- will it reflect CPU Load similar to top/monit?
0.197375
0
0
683
27,269,574
2014-12-03T10:42:00.000
125
0
0
0
python,django,configuration,ide,pycharm
28,256,637
2
true
1
0
Yes you can. In Run -> Edit Configurations create new configuration [+] / Python Name: runserver Scrip Path: path_to/manage.py Parameters: runserver
1
43
0
Has anyone had issues setting up a debug configuration for Django project in PyCharm Community Edition? Community Edition of the IDE is lacking the project type option on project setup and then when I am setting up Debug or Run config it asks me for a script it should run. What script would it be for Django, manage.py?...
How to run Debug server for Django project in PyCharm Community Edition?
1.2
0
0
28,760
27,271,747
2014-12-03T12:26:00.000
0
0
0
1
python-2.7,nginx,python-requests,pyopenssl
28,087,767
1
false
0
0
Many TLS clients and servers consider it reasonable to abruptly close the TCP connection without finishing the TLS disconnect handshake. They may not do it all the time. It may depend on very specific, esoteric network conditions (eg, how quickly certain sends are executed). When this happens, you get the error you'...
1
0
0
After installing pyopenssl, ndg-httpsclient and pyasn1 to support SSL with SNI. I get the following error, for certain https urls: (-1, 'Unexpected EOF') only when running under nginx tried: removing the gzip from nginx.
Unexpected EOF for https with python requests under nginx
0
0
0
1,403
27,273,499
2014-12-03T13:54:00.000
0
0
0
1
java,python,c++,multithreading,affinity
27,275,002
2
false
0
0
I'm not sure I understand what you want exactly, but in Java I remember that I could launch multiple JVM and run my java programs on different OS processes, using inter-processes communication (socket, pipe or whatever you want) to do multi-core processing and syncronization. Knowing that, it might be possible to then ...
1
1
0
When I create a thread with Java or Python I can't find the pid among the operating system threads. In fact get_ident() in Python gives me a very large number that can't be the PID. In fact I need to set the process affinity of all other threads to the first processor core then I want to dedicate the other cores to my ...
set thread affinity in python and java
0
0
0
1,814
27,276,680
2014-12-03T16:23:00.000
3
0
1
0
python,keyboard-shortcuts,shortcut
27,276,785
2
true
0
0
If you're in IDLE, use Alt+P and Alt+N to navigate your command history.
2
1
0
When I use R and execute a command in the command window, I can just press up and I get the last executed command in the current command line. What key do I need to press in order to get the same in Python? Edit: When I asked this question, I did not know what IDLE or iPython is. I just googled "download python" and d...
How to get the last executed command in IDLE as in R?
1.2
0
0
415
27,276,680
2014-12-03T16:23:00.000
1
0
1
0
python,keyboard-shortcuts,shortcut
33,307,145
2
false
0
0
For anyone else who comes upon this looking for a mac solution, I found that Contrl+Option+n and Contrl+Option+n worked to cycle through previously executed lines in IDLE (Python) 2.7.10 on OS 10.8.5. I realize that this should work without the Option, but for months I needed to use both modifier keys to execute the s...
2
1
0
When I use R and execute a command in the command window, I can just press up and I get the last executed command in the current command line. What key do I need to press in order to get the same in Python? Edit: When I asked this question, I did not know what IDLE or iPython is. I just googled "download python" and d...
How to get the last executed command in IDLE as in R?
0.099668
0
0
415
27,278,145
2014-12-03T17:39:00.000
2
0
0
1
python,windows,path,directory
27,278,464
2
false
0
0
I second @iCodez's answer to use os.getenvto get the path string from a system environment variable, but you might want to use the paths defined for APPDATA or LOCALAPPDATA instead. Windows permissions settings on the Program Files directory may prevent a standard user account from writing data to the directory. I be...
1
0
0
I've made a game and I'd like to save the highscore. So I need a place to do that. I chose to put it in the C:\All Programs directory. My problem is that that directory name isn't the same on every computer. For example on mine it's C:/Program Files (x86). So my question: Is there a way, to discover that path on any c...
Find C:\Programs path (not scripts path)
0.197375
0
0
124
27,278,297
2014-12-03T17:47:00.000
0
0
0
1
google-app-engine,google-cloud-storage,google-cloud-datastore,mysql-python,app-engine-ndb
28,197,823
1
false
1
0
MySQL commands cannot be run on NoSQL. You will need to do some conversions during manipulation of the data from both DBs.
1
1
0
Is it just about creating models that use the best fitting data store API? For part of the data I need relations, joins and sum(). For other this is not necessary but nosql way is more appropriate.
can I combine NDB and mysqldb in one app on google cloud platform
0
1
0
62
27,279,922
2014-12-03T19:21:00.000
0
1
0
0
python,python-3.x,bots,irc
27,316,992
1
true
0
0
It sounds like you want to write the same QUIT log message to multiple per-channel log files, but only specific ones the bot is in? To accomplish something similar, I ended up getting the list of names in a channel when the bot joins, then keeping track of every nick change, join, part, kick, and quit, and adjusting th...
1
0
0
So I'm writting an IRC bot in Python. Right now, the first thing I'm trying to get it to do is Log all the important things in every channel it's on (as well as private messages to the bot itself). So far I've gotten it to log the JOIN, PRIVMSG (including CTCP commands) and PART. However I'm having some trouble with th...
Logging where the QUIT command comes from in IRC
1.2
0
1
73
27,280,673
2014-12-03T20:07:00.000
0
0
1
0
python,parallel-processing,queue,gevent
27,281,582
1
true
0
0
This is a very simple approach, but might work within the constraints you've outlined. However, it does not make use of gevent directly. Write the output of each task to a temporary file named according to the id (order) of the task. When all tasks are complete, read the files in order and append the contents of each t...
1
0
0
Currently, there is a Python project using gevent to submit tasks that execute socket calls to one of our computing resources. The python program generates the requests of almost 1000 objects and executes them concurrently. When it receives the request (fixed width string stream), it writes the output straight into a...
How to process multiple tasks concurrently while maintaining order on the input & output?
1.2
0
0
138
27,283,326
2014-12-03T23:02:00.000
0
0
0
0
python,json,python-requests
27,283,764
1
true
0
0
Jon Skeet: Looks like it's the format from DataContractJsonSerializer apart from anything else - millis since the Unix epoch, and offset from UTC
1
0
0
I haven't been able to find an answer to this, and I was hoping y'all could help me out. When accessing the API for one of the products we use at work, a date field comes back in two different forms depending on if you request JSON or XML. The first, which I understand, is what XML sends: 2014-12-03T23:59:00 The seco...
API Date in a Strange Format
1.2
0
1
43
27,285,162
2014-12-04T02:17:00.000
0
0
1
0
java,python,eclipse,pydev
27,285,251
2
false
0
0
1 way to solve this problem is by turning off Automatically Closed parentheses. Open the preferences for editing, then go to Java -> Editor -> Typing and turn off parentheses.
2
3
0
This isn't really a coding problem, but more of just an Eclipse problem. Say you're typing x = (1), Eclipse will make the closing parenthesis for you the moment you type '(' It also normally writes over the closing parenthesis as you are typing as well. However, for some reason when I'm typing, it doesn't automaticall...
Eclipse isn't overwriting parenthesis
0
0
0
213
27,285,162
2014-12-04T02:17:00.000
0
0
1
0
java,python,eclipse,pydev
27,285,239
2
false
0
0
Check in the Settings Content Assist for your Editor. It has a setting to overwrite or not. And in my case it specifically mentions you can toggle that with Ctrl Key while the assist is active. The other setting related is Editor -> Typing. It also has some brace-close settings.
2
3
0
This isn't really a coding problem, but more of just an Eclipse problem. Say you're typing x = (1), Eclipse will make the closing parenthesis for you the moment you type '(' It also normally writes over the closing parenthesis as you are typing as well. However, for some reason when I'm typing, it doesn't automaticall...
Eclipse isn't overwriting parenthesis
0
0
0
213
27,293,173
2014-12-04T11:42:00.000
4
0
0
1
linux,python-2.7,plone,sles
27,300,059
1
false
1
0
The installer command: ./install.sh standalone --build-python --static-lxml=yes worked perfectly for me. The installer downloaded and built the Python and libxml2/libxslt components necessary to remedy the terribly out-of-date (and vulnerable) versions included with sles11sp3. System packages needed for the build wer...
1
1
0
I'm trying to install plone 4.3.4 on a SLES 11 SP3 64bit server via the Unified Installer. I've fullfilled all the dependencies listed in the readme.txt, but when I try to get the installer running with the command sudo ./install.sh --password=******* standalone I get the error message: which: no python2.7 in (/usr/bin...
Plone Unified Installer missing Python
0.664037
0
0
226
27,297,668
2014-12-04T15:24:00.000
0
0
0
0
python,powerpoint
27,297,868
1
true
0
1
It is probably possible to modify a .pptx file with the standard library without much effort: these new generation of files are meant to be zip-compressed XML + external images files, and can be handled by ziplib and standard xml parsers. Legacy .ppt files however are a binary closed format, with little documentation, ...
1
0
0
I know this is possible to do using additional libraries such as win32com or python-pptx, but I wasn wondering if anyone knew of a way to insert an image into a powerpoint slide using the standard libraries. Lots of googling has indicated that the best solution is probably win32com, but since I can guarantee that every...
Insert Image into PPT using Standard Libraries
1.2
0
0
507
27,300,409
2014-12-04T17:36:00.000
2
1
1
0
python,python-3.x,hash,cryptography,digital-signature
27,312,944
2
false
0
0
The best standardized algorithm currently available is still SHA-2. SHA-2 now consists of 6 hash functions: SHA-256, SHA-384 and SHA-512 were first defined. SHA-224 was later added to allow for a smaller output size. After that the less well available SHA-512/224 and SHA-512/256 were introduced. SHA-2 mainly consists o...
1
6
0
I am writing a program in Python for elliptic curve cryptography (for school and out of interest). I am currently working on the digital signature algorithm. I am currently looking for a good and secure hashing function which is either standard in Python or can easily be downloaded and imported. I thought about SHA256,...
Cryptographic hash functions in Python
0.197375
0
0
5,345
27,304,973
2014-12-04T22:01:00.000
0
0
0
0
python,tkinter
27,305,312
1
true
0
1
No, there isn't a way to tell what type of event is flagged by <<ListboxSelect>>. Using <<ListboxSelect>> is useless for binding to a letter key, however. It only will fire for mouse clicks and using the arrow keys to navigate the listbox. You can bind to <KeyPress>. That binding will tell you what key was pressed, an...
1
0
0
I am binding to ListBoxSelect and i want to implement a function which recognizes an alphabetical key-press and uses this to jump to the corresponding place in an alphabetically sorted list. Is there a way to tell what type of event is flagged by ListBoxSelect? I see something in the documentation about getting event "...
How to determine the type of event flagged by <> in Tkinter?
1.2
0
0
47
27,308,234
2014-12-05T03:25:00.000
8
0
1
1
python,macos,python-2.7,numpy,matplotlib
27,308,244
2
true
0
0
Points to keep in mind about Python If a script foobar.py starts with #!/usr/bin/env python, then you will always get the OS X Python. That's the case even though MacPorts puts /opt/local/bin ahead of /usr/bin in your path. The reason is that MacPorts uses the name python2.7. If you want to use env and yet use MacPort...
2
6
1
Can you shed some light on the interaction between the Python interpreter distributed with OS X and the one that can be installed through MacPorts? While installing networkx and matplotlib I am having difficulties with the interaction of /usr/bin/python and /opt/local/bin/python2.7. (The latter is itself a soft pointer...
/usr/bin/python vs /opt/local/bin/python2.7 on OS X
1.2
0
0
10,161
27,308,234
2014-12-05T03:25:00.000
0
0
1
1
python,macos,python-2.7,numpy,matplotlib
27,400,616
2
false
0
0
May I also suggest using Continuum Analytics "anaconda" distribution. One benefit in doing so would be that you won't then need to modify he standard OS X python environment.
2
6
1
Can you shed some light on the interaction between the Python interpreter distributed with OS X and the one that can be installed through MacPorts? While installing networkx and matplotlib I am having difficulties with the interaction of /usr/bin/python and /opt/local/bin/python2.7. (The latter is itself a soft pointer...
/usr/bin/python vs /opt/local/bin/python2.7 on OS X
0
0
0
10,161
27,308,293
2014-12-05T03:32:00.000
-2
0
1
0
python,duplicates,package,pip
27,308,401
9
false
0
0
This is not possible with the pip command line tool. All of the packages on PyPI have unique names. Packages often require and depend on each other, and assume the name will not change.
5
51
0
When installing a new python package with PIP, can I change the package name because there is another package with the same name? Or, how can I change the existing package's name?
How to install python package with a different name using PIP
-0.044415
0
0
22,776
27,308,293
2014-12-05T03:32:00.000
13
0
1
0
python,duplicates,package,pip
55,817,170
9
false
0
0
It's not possible to change "import path" (installed name) by specifying arguments to pip. All other options require some form of "changes to the package": A. Use pip install -e git+http://some_url#egg=some-name: that way even if both packages have the same import path, they will be saved under different directories (u...
5
51
0
When installing a new python package with PIP, can I change the package name because there is another package with the same name? Or, how can I change the existing package's name?
How to install python package with a different name using PIP
1
0
0
22,776
27,308,293
2014-12-05T03:32:00.000
0
0
1
0
python,duplicates,package,pip
48,315,327
9
false
0
0
I Don't think it is possible to change the name of package by using pip. Because pip can install packages which are exist and gives error if there is no package name which you write for change the name of package.
5
51
0
When installing a new python package with PIP, can I change the package name because there is another package with the same name? Or, how can I change the existing package's name?
How to install python package with a different name using PIP
0
0
0
22,776
27,308,293
2014-12-05T03:32:00.000
2
0
1
0
python,duplicates,package,pip
49,680,767
9
false
0
0
If you are struggling to install the correct package when using pip install 'module', you could always download its corresponding wheel file (.whl extension) and then install this directly using pip. This has worked for me in various situations in the past.
5
51
0
When installing a new python package with PIP, can I change the package name because there is another package with the same name? Or, how can I change the existing package's name?
How to install python package with a different name using PIP
0.044415
0
0
22,776
27,308,293
2014-12-05T03:32:00.000
4
0
1
0
python,duplicates,package,pip
50,367,038
9
false
0
0
Create a new virtualenv and then install the package on new virtualenv, with this you can have the different version of packages as well.
5
51
0
When installing a new python package with PIP, can I change the package name because there is another package with the same name? Or, how can I change the existing package's name?
How to install python package with a different name using PIP
0.088656
0
0
22,776
27,308,836
2014-12-05T04:35:00.000
1
0
0
0
python,module,openerp-7,odoo,time-management
27,353,088
1
true
1
0
You can manage this by grouping each employee according to their privilege. For example you have two groups Managerial and employee group so each of them might have different or some how common privilege on certain python objects from OpenERP so please identify those python objects and explore more in Setting >> Users...
1
0
0
I have downloaded and installed and also tested via a virtual machine online Odoo 8 and OpenErp 7. I have spent many hours tinkering with the apps and features of both. I am unable to find any way from hours I spend searching or tinkering for a method to change the approve timesheet functionality in the manner I will e...
In using OpenErp 7 or Odoo 8, how do I modify it such that a manager assigned to a project is the one who will approve all timesheet entries for it?
1.2
0
0
364
27,309,902
2014-12-05T06:13:00.000
1
0
1
0
python,json
27,310,481
1
true
0
0
close the reading instances with instance.close() after loading the values with json_object.loads().
1
0
0
I am working on an attendance system on Local server which contains the database file in json format and when a request is made to the system via RFID the script looks into the local json file for the RFID and respond accordingly. Now the problem is that for single request it is performing well but as our script(made i...
Error on reading json file by multiple instances at the same time
1.2
0
1
135
27,311,941
2014-12-05T08:45:00.000
1
0
0
0
python,arrays,numpy
27,312,169
1
true
0
0
Just putting a list(...) call around your call to normal will turn it into a regular Python list.
1
0
1
I am using the function numpy.random.normal(0,0.1,20) to generate some numbers. Given below is the output I get from the function. The problem is I want these numbers to be in an array format. [ 0.13500488 0.11023982 0.09908623 -0.01437589 0.00619559 -0.17200946 -0.00501746 0.07422642 0.1226481 -0.01422786 -0.0...
How to convert numpy distribution to an array?
1.2
0
0
330
27,315,254
2014-12-05T11:47:00.000
0
0
1
1
python,windows,login
27,330,723
1
true
0
0
So I've found a way to do it from a Windows service (written in C++) and presumably the ctypes library will permit me to use it. Simple as using LogonUser from Win32API so far as I can see. Yet to actually set up and test it but it does seem to be exactly what I need. The difficulty being that session0 can only be acce...
1
0
0
I'm theory crafting a Python service which will manipulate domain joined machines into running tests as part of a suite. Details of requirements We must be logged in as a domain user, and we must not have the automatic login enabled We need to reboot machines a few times, so it's a requirement for this to be sustainab...
Log in to Windows from a Python service?
1.2
0
0
46