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
48,757,083
2018-02-12T23:11:00.000
0
0
0
0
python,nginx,flask,uwsgi
48,794,623
2
false
1
0
Finally I was able to solve this issue. Thanks to @Jeff Storey and @joppich. My proxy server was not able to read the response from by backend server which was causing this issue. I added an interceptor to catch all exceptions and propagate it to NGINX via uwsgi using the nginx proxy_intercept_errors on;. Big thanks Je...
2
0
0
I am running a Flask application and using uwsgi socket nginx configuration. This may be a stupid question but the issue I am facing is that whenever there is exception raised in Flask code (non handled exception for example 1/0), my nginx gives 502 instead of 500. I wanted to know if raising the exception is not getti...
nginx gives 502 for non handled exception 500 error in flask
0
0
0
1,072
48,757,970
2018-02-13T00:58:00.000
0
0
1
0
tensorflow,ipython
48,777,636
1
false
0
0
I think I figured out the problem. pip was pointing to /Library/Frameworks/Python.framework/Versions/3.4/bin/pip My ipython was pointing to /opt/local/bin/ipython I re-installed tensorflow within my virtual environment by calling /opt/local/bin/pip-2.7 install --upgrade tensorflow Now I can use tensorflow within ipytho...
1
0
1
tensorflow works using python in a virtualenv I created, but tensorflow doesn't work in the same virtualenv with ipython. This is the error I get: Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the pac...
Running tensorflow in ipython
0
0
0
213
48,759,535
2018-02-13T04:35:00.000
0
0
0
0
python,tensorflow,computer-vision
48,761,331
1
true
0
0
The scores argument decides the sorting order. The method tf.image.non_max_suppression goes through (greedily, so all input entries are covered) input bounding boxes in order decided by this scores argument, selects only those bounding boxes from them which are not overlapping (more than iou_threshold) with boxes alrea...
1
1
1
I read the document about the function and I understood how NMS works. What I'm not clear is scores argument to this function. I think NMS first look at bottom right coordinate and sort according to it and calculate IoU then discard some boxes which have IoU greater than the threshold that you set. In this theory score...
What does tensorflow nonmaximum suppression function's argument "score" do to this function?
1.2
0
0
537
48,761,144
2018-02-13T07:00:00.000
1
0
0
0
python-3.x,tensorflow,computer-vision,softmax,sigmoid
48,762,415
1
true
0
0
Since you're doing single label classification, softmax is the best loss function for this, as it maps your final layer logit values to a probability distribution. Sigmoid is used when it's multilabel classification. It's always better to use a momentum based optimizer compared to vanilla gradient descent. There's a b...
1
1
1
I am doing transfer-learning/retraining using Tensorflow Inception V3 model. I have 6 labels. A given image can be one single type only, i.e, no multiple class detection is needed. I have three queries: Which activation function is best for my case? Presently retrain.py file provided by tensorflow uses softmax? What a...
Image Classification using Tensorflow
1.2
0
0
124
48,762,723
2018-02-13T08:49:00.000
4
0
1
0
python,python-2.7
49,032,416
1
true
0
0
The data provider is the connection to the underlying file or database that holds the geospatial information to be displayed. In QGIS, a data provider (instance of qgis.core.QgsVectorDataProvider) allows the vector/raster layer to access the features within the data source. It includes a geometry type (stored in the da...
1
2
0
I'm a beginner in PyQGIS and I've come across the dataProvider() function a few times now. The problem is I don't know what it does and what it's for. I have been searching everywhere for its meaning and use/s. Any help is appreciated :)
What is dataProvider() in PyQGIS and what does it do?
1.2
0
0
2,025
48,764,814
2018-02-13T10:40:00.000
2
0
0
1
python-3.x,user-interface,rdp,pywinauto
49,934,460
1
true
0
0
It is not possible to automate a RDP window using pywinauto as RDP window itself is an image of a desktop. Printing control identifiers of the RDP window gives the UI of the screen. Solution is to install python+pywinauto in the remote machine.
1
0
0
Can anyone of you help me with an automation task which involves connecting through rdp and automating certain task in a particular application which is stored in that server. I have found scripts for rdp connection and for Windows GUI automation seperately. But in the integration, I have become a bit confused. It wil...
GUI Automation in RDP
1.2
0
1
1,322
48,766,455
2018-02-13T12:05:00.000
0
0
0
0
python,pyqt,squish
52,899,603
3
false
0
1
Adding TimeoutMilliseconds did not work, so I added time.sleep(Seconds) and this worked for me better.
1
1
0
I am using Squish 6.3 Qt. The application i am testing contains a QLabel whose content changes dynamically. Is it possible to wait for the label to be set to a particular value? I can't use waitForObject as the object always exists and only its text value keeps changing.
Wait for an object property to be set in squish
0
0
0
2,137
48,766,723
2018-02-13T12:20:00.000
0
0
0
0
python,selenium,import
48,767,767
1
false
0
0
Is it possible that you're using e.g. Python 3 for your project, and selenium is installed for e.g. Python 2? If that is the case, try pip3 install selenium
1
0
0
I have a python project with Selenium that I was working on a year ago. When I came back to work on it and tried to run it I get the error ImportError: No module named selenium. I then ran pip install selenium inside the project which gave me Requirement already satisfied: selenium in some/local/path. How can I make my...
Import error "No module named selenium" when returning to Python project
0
0
1
141
48,767,750
2018-02-13T13:18:00.000
0
0
0
0
python,opencv,image-processing,python-imaging-library
48,771,960
1
false
0
0
There are two common methods: bilinear interpolation, bicubic interpolation. These evaluate an intermediate value, based on the values at four or sixteen neighboring pixels, using weighting functions based on the fractional parts of the coordinates. Lookup these expressions. From my experience, the bilinear quality i...
1
1
1
I have an image and and am transforming it with a nonlinear spatial transformation. I have a written a function that, for every pixel (i, j) in the destination image array, returns a coordinate (y, x) in the source array. The returned coordinate is a floating point value, meaning that it corresponds to a point that li...
estimation of subpixel values from images in Python
0
0
0
1,342
48,769,149
2018-02-13T14:31:00.000
0
0
1
0
python,search,data-structures
48,769,576
1
false
0
0
I realized that I misread the assignment. It said: "Important note: Make sure to use the Stack, Queue and PriorityQueue data structures provided to you in util.py! These data structure implementations have particular properties which are required for compatibility with the autograder." I had misread it as saying that ...
1
1
1
I'm working on a project from the Berkeley AI curriculum, and they require me to use stacks, queues, and priority queues in my Depth First Graph Search implementation. I stored my fringe in a priority queue and my already visited states in a set. What am I supposed to use stacks and queues for in this assignment? I'm n...
Why would I need stacks and queues for Depth First Search?
0
0
0
86
48,769,882
2018-02-13T15:10:00.000
6
0
0
0
python,pygame
48,770,582
1
true
0
1
You must first understand how pygame.display.flip and pygame.display.update work. When the screen mode pygame.DOUBLEBUF is set, Pygame actually maintains two screens: the active screen which is presently displayed and a buffer which you (the programmer) can update behind the scenes (without the user seeing anything). O...
1
0
0
I do not understand what the difference is between pygame.display.update() and pygame.display.flip(). I have tried both and it seems that update() is slower than flip()... EDIT: My question is why update() with no parameters is much slower than flip(). Thanks!
Why is pygame.display.update() slower than pygame.display.flip()?
1.2
0
0
1,482
48,770,542
2018-02-13T15:46:00.000
36
0
0
0
python,pandas,csv,pickle
62,222,676
2
false
0
0
csv ✅human readable ✅cross platform ⛔slower ⛔more disk space ⛔doesn't preserve types in some cases pickle ✅fast saving/loading ✅less disk space ⛔non human readable ⛔python only Also take a look at parquet format (to_parquet, read_parquet) ✅fast saving/loading ✅less disk space than pickle ✅supported by many platfor...
1
31
1
I am learning python pandas. I see a tutorial which shows two ways to save a pandas dataframe. pd.to_csv('sub.csv') and to open pd.read_csv('sub.csv') pd.to_pickle('sub.pkl') and to open pd.read_pickle('sub.pkl') The tutorial says to_pickle is to save the dataframe to disk. I am confused about this. Because when I us...
What is the difference between save a pandas dataframe to pickle and to csv?
1
0
0
25,209
48,770,786
2018-02-13T15:59:00.000
4
0
0
0
python,numpy
48,770,832
2
true
0
0
A linear space. So in other words, from a straight line over an interval we take n samples.
1
4
1
I'm learning python and numpy. The docstring of numpy.linspace says Return evenly spaced numbers over a specified interval. Returns num evenly spaced samples, calculated over the interval [start, stop]. So I guess the "space" part of linspace means "space". But what does "lin" stand for?
Why linspace was named like that in numpy?
1.2
0
0
672
48,772,017
2018-02-13T17:05:00.000
0
0
1
0
java,python
48,772,107
4
false
1
0
Take a look at Collections in java. There are many lists (ArrayList, LinkedList etc). Choose the best datastructure needed for the requirement and complexity (both space and time).
1
10
0
In Python there is a data structure called 'List'. By using 'List' data structure in Python we can append, extend, insert, remove, pop, index, count, sort, reverse. Is there any similar data structure in Java where we can get all that function like Python List?
Java equivalent of Python List
0
0
0
11,087
48,772,583
2018-02-13T17:39:00.000
1
0
1
0
python,google-cloud-platform,google-cloud-functions
50,966,006
4
false
0
0
You can use AWS lambda as well if you want to work around and still use Python as your main language. Some modules/packages will need to be imported via zip file with AWS Lambda but it has a broader range of usable languages than GCF
1
10
0
Can Google Cloud Functions handle python with packages like sklearn, pandas, etc? If so, can someone point me in the direction of resources on how to do so. I've been searching a while and it seems like this is impossible, all I've found are resources to deploy the base python language to google cloud.
Python in Google Cloud Functions
0.049958
0
0
12,755
48,775,903
2018-02-13T21:25:00.000
4
0
1
0
python
48,775,915
2
true
0
0
No, it does not involve multiprocessing at all. And neither does it involve threading at all, zip is acting entirely in the current thread. However, the zip is lazy (in the current version of Python), meaning elements will not be evaluated until you iterate a zip instance.
2
2
0
I'm wondering if Python's zip() function is executed in a multi-processing way, or it is actually done by a single thread, and then simply combines the results together?
Is Python's zip() function executed in a multi-processing way?
1.2
0
0
373
48,775,903
2018-02-13T21:25:00.000
1
0
1
0
python
48,775,948
2
false
0
0
Nope it is a single process . It is done in a single thread
2
2
0
I'm wondering if Python's zip() function is executed in a multi-processing way, or it is actually done by a single thread, and then simply combines the results together?
Is Python's zip() function executed in a multi-processing way?
0.099668
0
0
373
48,776,116
2018-02-13T21:41:00.000
0
1
1
0
python,coverage.py
48,830,576
3
true
0
0
Since coverage.py does not provide this feature, my solution was to write a small ast based function that calculate ghost hit points and remove them from the the coverage.py results
1
0
0
I have a python program that imports other files which potentially import other files, as is normal with python development The problem is, when I measure coverage with coverage.py, some files which are imported but not used, get coverage "hits" on the def and import statements. My question is: is there are way to avoi...
With coverage.py, how to skip coverage of import and def statements
1.2
0
0
1,816
48,776,853
2018-02-13T22:38:00.000
2
0
1
0
python,python-3.x,image-scanner,python-importlib
48,776,883
1
false
0
0
importlib is builtin with Python 3 (at least for me), you can import it directly without installing anything. The error from pip install is possibly due to importlib is builtin and there's no distribution that's publicly available.
1
3
0
I am trying to pip install importlib with python 3.6, but I get an Import Error saying: 'NO Module named "importlib.util"'. This also comes up when I try to pip install imagescanner, which is my real intention. Building an App that connects to Image Scanner Devices, but that's another problem... Thanks for any help!
What is importlib.util in python3?
0.379949
0
0
6,403
48,779,478
2018-02-14T04:04:00.000
0
0
0
0
python-3.x,wxwidgets
48,779,658
2
false
0
1
Try this: self.YourCheckboxObject.SetToolTip(wx.ToolTip("Paste your tooltip text here"))
1
0
0
And if so, how would one add a tooltip to a checkbox object? It appears that the control inherits from wxWindow which has tooltips, so can it be added to a wxCheckBox? Thanks!
Python - can you add a tooltip on a wx.CheckBox object?
0
0
0
438
48,780,634
2018-02-14T06:04:00.000
5
0
0
0
python-3.x
52,187,177
1
false
0
0
Use below code, this worked for me: pip3 install --upgrade oauth2client
1
2
0
I got this error in in Python3.6 ModuleNotFoundError: No module named 'oauth2client.client',i tried pip3.6 install --upgrade google-api-python-client,But I don't know how to fix Please tell me how to fix, Thanks
ModuleNotFoundError: No module named 'oauth2client.client'
0.761594
0
1
7,084
48,780,865
2018-02-14T06:20:00.000
0
0
1
0
python,callback,listener
48,781,129
1
false
0
0
You can achieve that using a good while loop that updates your listener function so long as your set criteria evaluate to true.
1
0
0
I am trying to write a python script which registers a function as a listener for certain events. However, by the time the listener callback function gets called, the python process has ended, since it is just a short script. What is the best way to keep the python process running so that the callback function can be r...
How to keep python running to respond to callback being called
0
0
0
388
48,784,009
2018-02-14T09:46:00.000
0
1
0
0
python-2.7,raspberry-pi,raspberry-pi3,barcode-scanner,raw-input
48,805,544
1
true
0
0
At last the problem is solved, in barcode scanner there is a mode where automatic enter key pressing is done.Just have to scan the enterkey barcode from the barcoe scanner manual.
1
0
0
I am trying to take input from usb barcode scanner in python (Raspberry pi). Barcode scanner works as keyboard so i need to press enter key after scanning .I dont want to press enterkey after scanning the data, the data (barcode) should be directly stored in to variable. How to do it?
How to use usb barcode scanner with python?
1.2
0
0
2,635
48,787,209
2018-02-14T12:25:00.000
0
0
1
0
python,anaconda,jupyter
48,991,612
4
false
0
0
I tried an old version of Anaconda exactly Anaconda3-4.0.1 and it works. Now I have my Anaconda Navigator and can launch jupyter notebook.
3
3
0
After installing Anaconda3 I tried to search in my start menu for Anaconda Navigator but it just doesn't show. All I get when typing Anaconda in my start menu is Anaconda Prompt, I have tried to launch jupyter notebook from the Anaconda Prompt but it says that "jupyter n'est pas reconnu en tant que commande interne ou ...
Jupyter notebook and Anaconda Navigator does not show after installing Anaconda
0
0
0
11,230
48,787,209
2018-02-14T12:25:00.000
0
0
1
0
python,anaconda,jupyter
57,987,418
4
false
0
0
This problem also happened to me under Ubuntu 16.04 LTS. I solved my problem by changing my BASHRC file (~/.bashrc). In this file, there is one line added by Anaconda installer: export PATH="/home/mustafa1/anaconda3/bin:$PATH" # commented out by conda initialize I just removed the # sign to make it work (of course I...
3
3
0
After installing Anaconda3 I tried to search in my start menu for Anaconda Navigator but it just doesn't show. All I get when typing Anaconda in my start menu is Anaconda Prompt, I have tried to launch jupyter notebook from the Anaconda Prompt but it says that "jupyter n'est pas reconnu en tant que commande interne ou ...
Jupyter notebook and Anaconda Navigator does not show after installing Anaconda
0
0
0
11,230
48,787,209
2018-02-14T12:25:00.000
2
0
1
0
python,anaconda,jupyter
59,334,555
4
false
0
0
i solved my problem by del .condarc file. And restart Navigator. That's ok.
3
3
0
After installing Anaconda3 I tried to search in my start menu for Anaconda Navigator but it just doesn't show. All I get when typing Anaconda in my start menu is Anaconda Prompt, I have tried to launch jupyter notebook from the Anaconda Prompt but it says that "jupyter n'est pas reconnu en tant que commande interne ou ...
Jupyter notebook and Anaconda Navigator does not show after installing Anaconda
0.099668
0
0
11,230
48,787,340
2018-02-14T12:33:00.000
0
0
0
0
python,tensorflow
48,787,920
1
false
0
0
It's to define the random seed. By this means, the weight values are always initialized by the same values. From Wiki: A random seed is a number (or vector) used to initialize a pseudo-random number generator.
1
0
1
What does seed=1 is doing in the following code: W3 = tf.get_variable("W3", [L3, L2], initializer = tf.contrib.layers.xavier_initializer(seed=1))
seed=1, TensorFlor- Xavier_initializer
0
0
0
160
48,787,973
2018-02-14T13:05:00.000
0
0
1
0
ipython,jupyter-notebook
67,408,827
3
false
0
0
On Safari, if the focus is on an incognito window, the notebook will open automatically in it.
1
3
0
On executing the command jupyter notebook, notebook opens on Mozilla Firefox. How to open notebook on incognito mode of Mozilla Firefox from command line?
Run jupyter notebook in incognito window
0
0
0
2,541
48,789,406
2018-02-14T14:20:00.000
0
0
0
0
python,optimization,scipy,least-squares
48,790,015
1
false
0
0
According to the help of scipy.optimize.least_squares, max_nfev is the number of function evaluations before the program exits : max_nfev : None or int, optional Maximum number of function evaluations before the termination. If None (default), the value is chosen automatically: Again, according to the hel...
1
0
1
I am trying to use scipy.optimize.least_squares(fun= my_fun, jac=my_jac, max_nfev= 1000) with two callable functions: my_fun and my_jac both fuctions: my_fun and my_jac, use an external software to evaluate their value, this task is much time consuming, therefore I prefer to control the number of evaluations for both t...
scipy.optimize.least_squares - limit number of jacobian evaluations
0
0
0
675
48,794,599
2018-02-14T19:14:00.000
1
0
1
1
python-3.x,pyinstaller,cx-freeze
48,795,211
1
false
0
0
3.6 is supported by both now. pip install pyinstaller should work If you are by chance using an Anaconda environment you will have to conda install pip before you pip install pyinstaller
1
0
0
I want to create a standalone executable, I am using python 3.6 on 64 bit os. And while trying to install cx freeze I got this msg no matching distrubtion found for pyinstaller Same error with cxfreeze
Is python 3.6 supported by pyinstaller or cxfreeze?
0.197375
0
0
768
48,795,392
2018-02-14T20:09:00.000
0
0
0
0
python,sockets,flask
48,795,531
1
false
1
0
If your HTTP client is written in python the simplest solution would be to use a higher level HTTP library like requests or urllib2. If you want to get the path mappings against your Flask app views you could print them by introspecting the app object and export them to json or some other format and use them in your cl...
1
0
0
I am developing a desktop application that must send a specified url to a Flask application hosted online, and subsequently receive data from the same Flask app. 2 applications communicating back & forth. I am able to make GET and POST requests to this Flask app, but I am unaware of how to construct specific URL's whic...
Python - Using socket to construct URL for external Flask server's view function
0
0
1
113
48,795,574
2018-02-14T20:22:00.000
0
0
0
0
python,arrays,numpy,coordinates,translation
49,395,441
1
true
0
0
My initial question was very misleading - my apologies for the confusion. I've since solved the problem by translating my local array (data cube) within a global array. To accomplish this, I needed to first plot my data within a larger array (such as a Mayavi scene, which I did). Then, within this scene, I moved my da...
1
0
1
I have a 128-length (s) array cube with unique values held at each point inside. At the center of this cube is the meat of the data (representing an object), while on the inner borders of the cube, there are mostly zero values. I need to shift this entire array such that the meat of the data is actually at the origin ...
Translating entire coordinates of array to new origin
1.2
0
0
297
48,795,950
2018-02-14T20:50:00.000
3
0
0
0
python,tensorflow,object-detection
54,771,885
2
false
0
0
You don't mention which type of model you are training - if like me you were using the default model from the TensorFlow Object Detection API example (Faster-RCNN-Inception-V2) then num_clones should equal the batch_size. I was using a GPU however, but when I went from one clone to two, I saw a similar error and settin...
1
8
1
I wanted to train on multiple CPU so i run this command C:\Users\solution\Desktop\Tensorflow\research>python object_detection/train.py --logtostderr --pipeline_config_path=C:\Users\solution\Desktop\Tensorflow\myFolder\power_drink.config --train_dir=C:\Users\solution\Desktop\Tensorflow\research\object_detection\tra...
[Tensorflow][Object detection] ValueError when try to train with --num_clones=2
0.291313
0
0
2,859
48,806,594
2018-02-15T11:51:00.000
0
0
0
1
python,pyqt,maya
48,861,511
2
true
0
0
Solution: Calling the .exe seems to set all needed PYTHONPATH options needed for Maya to run. This is not the case when calling it from Python. Manually adding it to the PYTHONPATH before executing solves the issue.
1
0
0
so I am trying to launch Maya using Python 2.7 as subprocess. My goal for now is to fire it up and hand over some variables. Launching is working, but it does throw errors I do not have when launching via a bat file. The process is currently Windows 10 only and I am using Maya 2018 latest update. Seems like PyQT is no...
Maya python launch
1.2
0
0
732
48,806,894
2018-02-15T12:06:00.000
0
0
0
0
python
49,682,887
2
false
1
0
I tried robot.step() and it works thank you. I use small increments of time so that the code is not continuously blocing and there is time for my sensors to do the reading.
1
0
0
I am using webots for my project at university. I want my robot to do a specific action for a certain amount of time, but I cannot find a way to do it without blocking the code and the sensors and consequently the whole simulation. I tried both the commands robot.step() and time.sleep() but they both blocck the code an...
Webots programming with Python - blocking code
0
0
0
529
48,812,910
2018-02-15T17:20:00.000
4
0
0
0
python,selenium
48,813,013
1
true
0
0
The path 'org.openqa.selenium.support.ui.Select' is a Java descriptor. In Python, make sure you have the Python Selenium module installed with pip install selenium, and then import it with import selenium. For the Select function specifically, you can import that with the following from selenium.webdriver.support.ui im...
1
1
0
I am trying to use the Select function in Selenium for Python 3 to help with navigating through the drop down boxes. However, when I try to import org.openqa.selenium.support.ui.Select I get an error message: "No module named 'org'" Would appreciate any help on this. I saw there was a similar question posted a few week...
Selenium / Python - No module named 'org'
1.2
0
1
5,709
48,818,101
2018-02-15T23:47:00.000
1
0
0
0
python,django,python-3.x,django-1.10
48,818,718
1
false
1
0
post_save won't know anything about any form that might have caused the model change. If you want to access that checkbox value you need to do it in the form class itself. I would probably override the clean() method of the form, and check for the checkbox value in cleaned_data['checkbox_field'] there, and then do what...
1
0
0
Is there a way I can access the form that caused a post_save? The use case is that I have a field (a checkbox) that isn't attached to a particular model, but it's an extra field in the form itself. I want to know whether the field was checked or unchecked when the form got saved and the model stored, and imho the post_...
Access the form that caused a post_save [Django]
0.197375
0
0
148
48,822,796
2018-02-16T08:30:00.000
0
0
0
0
python,image-processing,tensorflow
48,822,919
1
true
0
0
Single label classification is not something Neural Networks can do "off-the-shelf". How do you train it ? With only data relevant to your target domain ? Your model will only learn to output one. You have two strategies: you use the same strategy as in the "HotDog or Not HotDog app", you put the whole imagenet in tw...
1
0
1
I am using Tensorflow retraining model for Image Classification. I am doing single label classification. I want to set a threshold for correct classification. In other words, if the highest probability is less than a given threshold, I can say that the image is "unknown" i.e. if np.max(results) < 0.5 -> set label as ...
Probability for correct Image Classification in Tensorflow
1.2
0
0
288
48,824,675
2018-02-16T10:24:00.000
2
0
0
0
python-2.7,opencv,hpc,torque,environment-modules
48,829,716
1
true
0
0
The Python module uses a system library (namely libSM.so.6 : library support for the freedesktop.org version of X) that is present on the head node, but not on the compute nodes (which is not very surprising) You can either: ask the administrators to have that library installed systemwide on the compute nodes through ...
1
2
1
I have a task to train neural networks using tensorflow and opencv-python on HPC nodes via Torque. I have made privatemodule with python virtualenv and installed tensorflow and opencv-python modules in it. In the node I can load my python module. But when I try to run training script I get following error: Traceback...
create environment module to work with opencv-python on hpc nodes
1.2
0
0
388
48,825,025
2018-02-16T10:43:00.000
1
1
1
0
python,centos,centos7,yum
48,830,296
2
true
0
0
I fixed this issue by installing CentOS on a VM and then scp the python2.7 directory to the server.
2
1
0
I accidentally removed my Python's site-packages which means I got no any modules. Unfortunately, I noticed too late that the Yum uses a module named yum which is installed in the Python's site-packages where is located in /usr/local/lib/python2.7/site-packages. I was trying to reinstall yum but no yum module was insta...
Centos 7 - No module named yum - Accidentally removed Python site-packages
1.2
0
0
1,086
48,825,025
2018-02-16T10:43:00.000
0
1
1
0
python,centos,centos7,yum
48,825,047
2
false
0
0
Try rpm -V yum which checks for issues with yum
2
1
0
I accidentally removed my Python's site-packages which means I got no any modules. Unfortunately, I noticed too late that the Yum uses a module named yum which is installed in the Python's site-packages where is located in /usr/local/lib/python2.7/site-packages. I was trying to reinstall yum but no yum module was insta...
Centos 7 - No module named yum - Accidentally removed Python site-packages
0
0
0
1,086
48,825,031
2018-02-16T10:43:00.000
0
0
1
0
python,pycharm,jetbrains-ide
50,845,594
3
false
0
0
With VIM emulation on: Use scrollbar to scroll to the end of what you want to copy. (click/drag bar) Click and drag up to highlight a few lines. Use scrollbar again to scroll to the start of what you want to copy. Shift/click at the start of the text you want to copy. (should now be highlighted) Right click and selec...
3
1
0
Is there a sane way to copy log text from the PyCharm console, instead of selecting it slowly with the mouse (espacially when there's a bundance of text there)? There seem to be no "Select All" from the debug console. Is it on porpose? Is there any way to copy (all of) the text from the console sanely? I do hope the g...
Is there a simple way to copy text from the debug console of PyCharm?
0
0
0
1,920
48,825,031
2018-02-16T10:43:00.000
0
0
1
0
python,pycharm,jetbrains-ide
48,851,083
3
false
0
0
I just click into the debug console window and press Ctrl-A (standard Windows shortcut for select all). Followed by Ctrl-C to copy and then Ctrl-V to paste it into another app (notepad++ or something).
3
1
0
Is there a sane way to copy log text from the PyCharm console, instead of selecting it slowly with the mouse (espacially when there's a bundance of text there)? There seem to be no "Select All" from the debug console. Is it on porpose? Is there any way to copy (all of) the text from the console sanely? I do hope the g...
Is there a simple way to copy text from the debug console of PyCharm?
0
0
0
1,920
48,825,031
2018-02-16T10:43:00.000
0
0
1
0
python,pycharm,jetbrains-ide
50,133,766
3
false
0
0
if you have vim emulator on it won't work. Turn it off by going to Tools and deselecting vim emulator. After that you can use Ctrl+A to select the text in the console. If that doesn't work you might have a mapping over the Ctrl+A shortcut, it's worth checking that out.
3
1
0
Is there a sane way to copy log text from the PyCharm console, instead of selecting it slowly with the mouse (espacially when there's a bundance of text there)? There seem to be no "Select All" from the debug console. Is it on porpose? Is there any way to copy (all of) the text from the console sanely? I do hope the g...
Is there a simple way to copy text from the debug console of PyCharm?
0
0
0
1,920
48,825,248
2018-02-16T10:55:00.000
0
0
0
0
python,cluster-analysis,customer
48,833,452
1
false
0
0
Avoid comparing Silhouettes of different projections or scalings. Internal measures tend to be too sensitive. Do not use tSNE for clustering (Google for the discussion on stats.SE, feel free to edit the link into this answer). It will cause false separation and false adjacency; it is a visualization technique. PCA will...
1
2
1
I work at an ecommerce company and I'm responsible for clustering our customers based on their transactional behavior. I've never worked with clustering before, so I'm having a bit of a rough time. 1st) I've gathered data on customers and I've chosen 12 variables that specify very nicely how these customers behave. Eac...
Clustering Customers with Python (sklearn)
0
0
0
214
48,831,091
2018-02-16T16:33:00.000
5
0
1
0
python,kernel,ipython,spyder
48,834,580
3
false
0
0
(Spyder maintainer here) This bug was introduced by the latest update to Pyzmq (17.0.0). The easiest way to solve this is to downgrade to Pyzmq 16.0.4 until a new version of Ipykernel is released (most probably 4.8.2).
2
3
0
Please bear with me, as I'm new to python and Stackoverflow. When starting Spyder (v3.2.6), my IPython console gets stuck on "Connecting to kernel..." All the solutions to similar inquiries that I can find seem to involve Anaconda, which I don't have installed (to my knowledge), and would prefer not to unless its absol...
IPython console stuck on "Connecting to kernel..." (Spyder v3.2.6, Py 3.6, Windows 10, 64x)
0.321513
0
0
5,284
48,831,091
2018-02-16T16:33:00.000
0
0
1
0
python,kernel,ipython,spyder
50,948,931
3
false
0
0
Go to "Environments" in the Anaconda Navigator. Search for pyzmq Click on the green tick box and select version 16.0.3 Click on "Apply" That's it, it should work after that. I had the same issue and it got resolved after doing this.
2
3
0
Please bear with me, as I'm new to python and Stackoverflow. When starting Spyder (v3.2.6), my IPython console gets stuck on "Connecting to kernel..." All the solutions to similar inquiries that I can find seem to involve Anaconda, which I don't have installed (to my knowledge), and would prefer not to unless its absol...
IPython console stuck on "Connecting to kernel..." (Spyder v3.2.6, Py 3.6, Windows 10, 64x)
0
0
0
5,284
48,832,344
2018-02-16T17:51:00.000
0
0
1
0
python,uninstallation
50,609,180
1
true
0
0
This depends on the OS and how Python was installed. For windows, look under %USERPROFILE%\AppData\Local\Programs\Python - or just run the installer again, it should have an option to fix or remove the current install.
1
0
0
I have accidentally removed several parts of python and now am trying to start again... The installer says that 57 files are still on my PC and I cannot find them. Does anyone know how to get a copy of the uninstaller? As it should find the remaining files.
How to remove the remains of python 3.7?
1.2
0
0
3,423
48,833,111
2018-02-16T18:48:00.000
0
0
0
0
python,django,python-requests
49,059,369
1
true
1
0
I know what the problem was. My application when it was being deployed was single threaded, not multithreaded. I changed my worker number and that fixed everything.
1
0
0
I'm doing a requests.get(url='url', verify=False), from my django application hosted on an Ubuntu server from AWS, to a url that has a Django Rest Framework. There are no permissions or authentication on the DRF, because I'm the one that made it. I've added headers such as headers = {'User-Agent': 'Mozilla/5.0 (Macint...
Why do I not get any content with python requests get, but still a 200 response?
1.2
0
0
48
48,835,136
2018-02-16T21:30:00.000
0
0
1
0
python,pygame,sprite
49,012,486
1
false
0
1
I just realised that you can run pygame.image.load() again to change the image.
1
1
0
I'm working on a program where I have a group() with sprites in them. I start by adding each sprite to the group and passing an image for each sprite. Is it possible loop through each sprite in the group and changing the image of a sprite if a certain criteria is met (if statement), or would you need to remove the whol...
Change sprite's image in pygame
0
0
0
2,080
48,835,956
2018-02-16T22:49:00.000
1
0
1
0
python
48,836,323
1
false
0
0
im 99.9999% sure that pyinstaller already has hooks for numpy just add import numpy at the top of myscript.py and run pyinstaller --onefile myscript.py && .\dist\myscript.exe but to answer your question look in the site-packages folder of you python folder (type which python to find your python version) or which pyinst...
1
1
0
I have been trying to convert a .py to .exe using pyinstaller and as you can see from the title.. the .exe file does not execute properly.. it says it does not find the module (numpy). So I did some research and I discovered that pyinstaller can have difficulties in finding modules.. Pyinstaller website: pyi-makespec ...
Missing modules Pyinstaller
0.197375
0
0
2,771
48,836,650
2018-02-17T00:14:00.000
0
0
0
0
python-3.x,gtk3
65,550,746
2
false
0
1
A lot later I had the same problem. IconView at least now supports that by default (if Ctrl is held). Note that your application must have keyboard focus.
1
1
0
I've already added the code for drag and drop to the iconview widget, but I haven't found any method for dragging two or more items: every time an item is selected, the previous selection is cleaned.
Python3-Gtk3. Iconview. Drag multiple items
0
0
0
109
48,837,086
2018-02-17T01:35:00.000
0
0
0
0
python,automation,pyautogui
70,868,419
1
false
0
1
Use confidence, default value is 0.999. Reason is pyscreeze is actually used by pyautogui which has the confidence value which most likely represents a percentage from 0% - 100% for a similarity match. Looking through the code with my amateur eyes reveals that OpenCV and NumPy are required for confidence to work otherw...
1
3
0
I use pyautogui to search an image on Desktop window for click automation. pyautogui.locateOnScreen(image) If the image is captured on the same screen as screenshot, it can be matched. However, if the image is a bit different, it cannot. e.g. captured as the low resolution image. Can I set some likelihood in pyautogu...
How to search not same images but similar images by pyautogui
0
0
0
330
48,840,025
2018-02-17T09:52:00.000
3
0
0
0
python,tensorflow,heroku,keras,deep-learning
61,806,979
7
false
1
0
A lot of these answers are great for reducing slug size but if anyone still has problems with deploying a deep learning model to heroku it is important to note that for whatever reason tensorflow 2.0 is ~500MB whereas earlier versions are much smaller. Using an earlier version of tensorflow can greatly reduce your slug...
1
10
1
I have developed a rest API using Flask to expose a Python Keras Deep Learning model (CNN for text classification). I have a very simple script that loads the model into memory and outputs class probabilities for a given text input. The API works perfectly locally. However, when I git push heroku master, I get Compiled...
Heroku: deploying Deep Learning model
0.085505
0
0
7,474
48,840,282
2018-02-17T10:21:00.000
0
0
1
0
python,python-3.5,python-3.6
48,840,524
3
false
0
0
Cannot comment since I don't the rep. If your default python is 3.5 when you check python --version, the way to go would be to find the location of the python executable for the desired version (here 3.6). cd to that folder and then run the command given by Mike.
1
0
1
I have both Python 3.5 and Python 3.6 on my laptop. I am using Ubuntu 16.04. I used pip3 to install numpy. It is working with Python3.5 but not with Python3.6. Please help.
numpy got installed in Python3.5 but not in Python3.6
0
0
0
2,139
48,841,270
2018-02-17T12:29:00.000
6
0
1
0
python-3.x,tensorflow
49,082,525
1
false
0
0
I've just fixed the same problem. Reason: space in names is not accepted. Simply modify 'the context text' to 'the-context-text' will fix your problem.
1
4
0
File "/Users/Mohannad/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 2908, in name_scope raise ValueError("'%s' is not a valid scope name" % name) ValueError: 'the context text' is not a valid scope name AnyBody know what does this mean or how to solve it ?
Valid scope name
1
0
0
2,448
48,842,812
2018-02-17T15:21:00.000
0
0
0
1
python,django,pythonanywhere
48,919,217
2
true
0
0
The problem was within my settings.py - I wasn't pointing the project to the correct database settings - username and password. I changed the settings to reflect those of my pythonanywhere details, and then I could operate manage.py properly from there.
2
0
0
I'm using PythonAnywhere with Postgresql, and have run into several problems. When I try to do anything, such as python manage.py makemigrations, I get the following error : sudo: unknown user: root sudo: unable to initialize policy plugin Also, I tried to use postgres -V, but I get command not found, and yet I can't...
sudo: unknown user: root via PythonAnywhere
1.2
0
0
1,874
48,842,812
2018-02-17T15:21:00.000
4
0
0
1
python,django,pythonanywhere
48,869,817
2
false
0
0
In general, makemigrations should not be using sudo. If it is, then there's something in your django settings that's making it do that. You don't need to run postgres - it's already running. See the Databases tab in your account for the connection details.
2
0
0
I'm using PythonAnywhere with Postgresql, and have run into several problems. When I try to do anything, such as python manage.py makemigrations, I get the following error : sudo: unknown user: root sudo: unable to initialize policy plugin Also, I tried to use postgres -V, but I get command not found, and yet I can't...
sudo: unknown user: root via PythonAnywhere
0.379949
0
0
1,874
48,845,754
2018-02-17T20:41:00.000
0
0
1
0
python,pyopencl
48,855,484
1
false
0
0
After looking more, here is the answer. In the case your computer has a platform or multiple, there should be located in Ubuntu here: /etc/OpenCL/vendors Then, you only have to copy/paste the icd files, in my case in the following path where I installed pyOpenCl. /home/[username]/anaconda2/etc/OpenCL/vendors And final...
1
0
0
I am trying to use pyOpenCL in an IPython notebook, Ubuntu 16.4, Nvidia card. But, I am getting the error: clGetPlatformIDs failed: unknown error -1001 However, if I run in terminal "clinfo" I get the 3 platforms installed. Where does PyOpenCL try to find the platforms? I can create a link in the folder that consults.
where or how does pyOpenCL looks for the clplatforms?
0
0
0
87
48,847,375
2018-02-18T00:45:00.000
0
0
1
0
python,scrapy,virtualenv
48,876,629
1
false
1
0
from user stanac, async and await are keywords in python 3.7. so even after I was able to install scrapy successfully, i couldn't run bench or shell (testing install) without throwing errors. installed a virtualenv targeting 2.7 and installed and ran bench/shell with no issues.
1
1
0
Good day! I'm pretty new to python/scrapy as in never tried it. I've been able to work through a lot of the issues I've come across but I'm stuck trying to resolve "Running setup.py bdist_wheel for lxml ... error" I can't seem to get past it. I've tried to "pip3 install lxml" but that fails. I could past the whole term...
Scrapy install in virtualenv - cant resolve issue. looks related to lxml?
0
0
0
188
48,848,335
2018-02-18T04:05:00.000
2
0
1
0
python,tuples,limits
48,848,431
2
false
0
0
I believe tuples and lists are limited by the size of the machine's virtual memory, unless you're on a 32 bit system in which case you're limited by the small word size. Also, lists are dynamically resized by... I believe about 12% each time they grow too small, so there's a little overhead there as well. If you're c...
1
2
0
I am building a web scraper that stores data retrieved from four different websites into a tuple array. I later iterate through the tuple and save the entire lot as both CSV and Excel. Are tuple arrays or arrays in general, limited to the processor's RAM/disc-space? Thanks
What is the maximum tuple array size in Python 3?
0.197375
0
0
758
48,848,755
2018-02-18T05:26:00.000
2
0
1
1
python,anaconda
50,187,215
2
false
0
0
I have encountered a similar problem, what I did to solve the problem was I removed all of those libraries which causing errors, by editing the .yml file. Why I did this? because some of packages are actually just support packages to others, which in my case the version of those packages didn't available any longer or ...
2
3
0
i have been trying to create an conda environment but i keep getting error saying resolve package not found however all the packages are already install.Even when i try to install any of the packages seperately it says package already installed.here is the error what i get conda env create -f tfdl_env.yml Solving envir...
Not able to create conda environment in macboook air(Resolvepackagenotfound)
0.197375
0
0
1,127
48,848,755
2018-02-18T05:26:00.000
0
0
1
1
python,anaconda
52,279,615
2
false
0
0
Delete the mentioned packages by editing the .yml file and run the command for environment creation. It works fine. Hope this helps.
2
3
0
i have been trying to create an conda environment but i keep getting error saying resolve package not found however all the packages are already install.Even when i try to install any of the packages seperately it says package already installed.here is the error what i get conda env create -f tfdl_env.yml Solving envir...
Not able to create conda environment in macboook air(Resolvepackagenotfound)
0
0
0
1,127
48,852,421
2018-02-18T13:52:00.000
0
0
0
0
java,python,server,client
48,852,566
1
false
1
0
On the laptop running the server: The client can access using localhost:<port> or 0.0.0.0:<port> Connecting from another laptop (same network): You have to connect to: <pc-server-local-ip>:<port> To get <pc-server-local-ip, using the laptop running your server: - Windows : type ipconfig in console, value next to IPV4...
1
0
0
I made server using python on laptop. And I made client using Java on samelaptop. They were connected, and They were communicated. But when I made client using Java on another laptop, client didn't find server What is wrong?? and What could I do??
python server and java client(another PC) Error
0
0
1
27
48,854,351
2018-02-18T17:09:00.000
1
0
0
0
python,flask,slack,slack-api
48,854,371
1
false
1
0
You could, but that is not a good way of doing it. Your operating system almost certainly has this functionality built-in; on unix-like systems for example you would use cron.
1
0
0
I was wondering if it was possible to have a web service running on Flask to execute a function at a certain time every day. I'm making a Slack bot with Flask and Python, and I want the bot to send out a reminder every day at 6:00 to a channel. Is it possible to keep track of the current time continuously, and only per...
How to execute a function at certain time and day with Flask and Python?
0.197375
0
0
479
48,854,507
2018-02-18T17:24:00.000
2
0
1
0
python-3.x
48,854,642
1
true
0
0
It marks an optional parameter. You can call mystring.center(42) as well as mystring.center(42, ' '). The function’s documentation should hint how the behavior would differ.
1
0
0
Looking through documentation I sometimes see a list of parameters containing par_n[,par x]. For example: str.center(width[, fillchar]) What does this mean? Any attempts of looking for answers using google and in stackoverflow have not been successful.
What does [,some_par] mean in python?
1.2
0
0
29
48,855,204
2018-02-18T18:34:00.000
1
0
0
0
python,django,session
48,855,694
2
true
1
0
AFAIK you can't. You need to implement some kind of time-limited reservation. Temporarily book a timeslot for user on his second booking step - right after he picks his date. Then if he finalizes the process make the book permanent or delete reservation (and make the date available again) after few minutes. You need to...
1
0
0
Is it possible in django to iterate all current sessions? I want to implement a calendar where it is impossible to book a timeslot that someone else is booking. I Keep a list of timeslots id's in the session before the user proceeds to checkout.
Iterate over all current sessions in django
1.2
0
0
315
48,856,497
2018-02-18T20:57:00.000
0
0
0
0
python,numpy
64,853,941
2
false
0
0
These are essentially the beta and the alpha values for the given data. Where beta necessarily demonstrates the degree of volatility or the slope
1
3
1
I went through the docs but I'm not able to interpret correctly IN my code, I wanted to find a line that goes through 2 points(x1,y1), (x2,y2), so I've used np.polyfit((x1,x2),(y1,y2),1) since its a 1 degree polynomial(a straight line) It returns me [ -1.04 727.2 ] Though my code (which is a much larger file) runs...
What does np.polyfit do and return?
0
0
0
6,890
48,859,452
2018-02-19T04:15:00.000
1
0
1
0
python,pycharm,cython,mypy
61,969,504
1
false
0
0
The .pyx file is regarded as a text file by default in Pycharm. However, you can change the setting. Go to File->Settings->Editor->File Types. In recognized file types, find "Text", delete the entry ".pyx" in the registered patterns. Then, find "Python" in the recognized file types, add an entry ".pyx" in the registere...
1
9
0
It seems python type checker in PyCharm automatically works for .py files.. but not for .pyx files. Is there any way to enable type checker for .pyx files in PyCharm? Also, is there any way to use mypy with cython files (.pyx files)?
How to enable PyCharm Type Checker feature for cython(.pyx) file?
0.197375
0
0
344
48,859,707
2018-02-19T04:53:00.000
0
1
0
1
python,raspberry-pi,usb-drive
48,959,545
1
false
0
0
Finally got it figured out. After additional trial and error, I figured out that there is something wrong with the wired network port on the Pi. Everything works fine if I swap out my Pi3 with my Pi1, and the Pi3 works if I use the WiFi (been using wired port for speed).
1
0
0
I have a Raspberry Pi connected to a Seagate Backup Plus 3T external hard drive. I've written a Python script to make backup copies of files from my Windows File Server onto the external hard drive. Everything SEEMS to be running fine. But when I copy a file from the external hard drive back to the Windows File Server...
Raspberry Pi: File copy to Seagate Backup Plus Bit Errors
0
0
0
74
48,860,824
2018-02-19T06:47:00.000
1
0
0
0
python,regression,jupyter-notebook,decision-tree
48,877,243
2
false
0
0
The whole point of using machine learning is to let it decide on its own how much weight should be given to which predictor based on its importance in predicting the label correctly. It just doesn't makes any sense trying to do this on your own and then also use machine learning.
2
0
1
I have a data set with continuous label ranging from one to five with nine different features. So I wanted to give weight to each feature manually because some of the features have very less dependency on the label so I wanted to give more weight to those features which have more dependency on the label. How can I manu...
how to manually give weight to features using python in machine learning
0.099668
0
0
839
48,860,824
2018-02-19T06:47:00.000
0
0
0
0
python,regression,jupyter-notebook,decision-tree
48,877,568
2
false
0
0
Don't assign weights manually, let the model learn the weights itself. It will automatically decide which features are more important.
2
0
1
I have a data set with continuous label ranging from one to five with nine different features. So I wanted to give weight to each feature manually because some of the features have very less dependency on the label so I wanted to give more weight to those features which have more dependency on the label. How can I manu...
how to manually give weight to features using python in machine learning
0
0
0
839
48,861,309
2018-02-19T07:28:00.000
0
1
1
0
python,python-unittest
48,861,482
2
false
0
0
A plain python function has no status code. Status codes are a part protocols like of HTTP. Your test can call the function and check if the result is a dictionary. Without knowing anything more about your function this is the only thing I can suggest.
1
0
0
Say I have a python function called sample(). It takes no arguments. It returns a dictionary in the end though. How can I perform unit testing for such a function ? Can I test it with status code like 200 ? How can i test if the function is written correctly ?
How to unittest a python function that takes no arguments?
0
0
0
1,043
48,861,862
2018-02-19T08:12:00.000
0
0
1
1
python,jenkins,installation,packages
49,557,738
2
false
0
0
"sys/param.h" is known from unix/linux environments only. I am not that sure but it might be further available with GNU C as well. I have to assume something in your configuration or setup went horribly wrong. As this question is rather specific to a certain project you might have more luck finding the answer if asking...
1
0
0
I am installing Python Jenkins package on Windows 7 x64 bit PC. I got following error: 'C1083: Cannot open include file: 'sys/param.h''. Python version 2.7.12. Any help is appreciated.
C1083: Cannot open include file: 'sys/param.h' error message while installing python jenkins package
0
0
0
1,227
48,864,357
2018-02-19T10:43:00.000
6
0
0
1
python,r,hdf5,netcdf4,ncl
48,870,492
3
true
0
0
with netcdf-c library you can: $ nccopy in.h5 out.nc
1
2
1
Is there a quick and simple way to convert HDF5 files to netcdf(4) from the command line in bash? Alternatively a simple script that handle such a conversion automatically in R, NCL or python ?
Convert hdf5 to netcdf4 in bash, R, python or NCL?
1.2
0
0
5,482
48,865,959
2018-02-19T12:11:00.000
1
1
0
0
python,algorithm
48,868,888
3
false
0
0
Actually, Your solution is not correct and here is why: Suppose you have many days where the same amount of ranges intersect, and this amount is the maximum among all others. For example: 1 -> 3 3 -> 6 6 -> 9 9 -> 10 From what I see you you have the following days (3, 6, 9) where all of them have two bills to be paid...
1
1
0
Below are a list of recurring monthly bills. The first number is the day of the month the bill arrives (first chance to pay it) and the second number is the due day of the month (last chance to pay it). 16, 1 2, 16 10, 25 31, 26 15, 31 The difference between the arrival and due date is always less than a month. I'm l...
Algorithm for fewest logins to online bank
0.066568
0
0
127
48,865,970
2018-02-19T12:11:00.000
0
1
1
0
python,amazon-web-services,aws-lambda,alexa,alexa-skills-kit
48,887,689
3
false
0
0
Just to clarify: If I want to invoke Keras all I have to do is download the Keras directories and put my lambda code and Keras directories as a zip folder and upload it directly from my desktop right? Just wanted to know if this is the right method to invoke Keras.
1
2
0
This is the error I get when I try to invoke my lambda function as a ZIP file. "The file lambda_function.py could not be found. Make sure your handler upholds the format: file-name.method." What am I doing wrong?
Error when invoking lambda function as a ZIP file
0
0
0
1,338
48,866,415
2018-02-19T12:37:00.000
0
0
0
0
python,django
48,867,156
2
false
1
0
One way you can try is searching/reading the.py files in the directory and match with regex a pattern describing the distinctive django main function and package names. Might be lucrative, but... eh
1
5
0
For the last two days I am struggling with the following question: Given an absolute path (string) to a directory (inside my file system or the server, it doesn't matter), determine if this dir contains a valid Django project. First, I thought of looking for the manage.py underneath, but what if some user omit or renam...
Ensure that a path to a dir is a Django project
0
0
0
119
48,866,543
2018-02-19T12:45:00.000
0
0
0
0
python,c++,swig
48,866,544
1
false
0
0
When I have been looking around, it seemed that the problem most likely is due to linking with incompatible libraries. However, I have discovered that it actually was due to using an abstract class without an implementation code. That is, SWIG seems not be able to create a Python wrapper from a class declaration withou...
1
1
0
I have a problem with loading the Python library I created by creating a Python API for a C++ project. When I load it into Python I get an error with Symbol not found:... Expected in: flat namespace... EDIT: I have given the solution to my problem below.
SWIG for C++, Symbol not found: Expected in: flat namespace
0
0
0
477
48,866,753
2018-02-19T12:57:00.000
0
0
0
1
python,node.js
48,867,119
2
false
0
0
It's bad practice to give sudo, as a hacker could do anything if there is any security issues. You could give the user witch runs the web server the permission to do the task your task is intending to do. In general try to avoid root whenever you can.
2
1
0
The script create some files in directories which need sudo permissions and executes few command that also need sudo privillage. I want to execute that script giving sudo privillage. Is there any way to do that ? I am trying to execute it with python-shell module as well as spawn child process.
How to execute a Python script in Node.js with sudo privillege
0
0
0
774
48,866,753
2018-02-19T12:57:00.000
1
0
0
1
python,node.js
48,942,162
2
true
0
0
I never got any answer on it, So I researched it on my own. The besy way to run any shell command or script is by using node-cmd moudle. It works soo bright . Just run the node script with sudo privillege, and you are good to go .
2
1
0
The script create some files in directories which need sudo permissions and executes few command that also need sudo privillage. I want to execute that script giving sudo privillage. Is there any way to do that ? I am trying to execute it with python-shell module as well as spawn child process.
How to execute a Python script in Node.js with sudo privillege
1.2
0
0
774
48,867,800
2018-02-19T13:58:00.000
9
0
0
0
python,tkinter,treeview,focus,ttk
48,867,937
2
false
0
1
ttk.treeview.focus() returns the current focus item. That means the item that was last selected. The function you are looking for is ttk.treeview.selection(). This returns a tuple of the selected items.
1
3
0
ttk.treeview.focus() returns the iid of a single line. The treeview box allows you to select multiple lines. How do I get a list of iids for the selected lines?
Tk Treeview Focus(). How do I Get Multiple Selected Lines?
1
0
0
6,125
48,870,318
2018-02-19T16:29:00.000
0
0
0
0
python,shell,wlst
48,902,430
1
false
1
0
Issue has been resolved, wlst was bypassing the python libraries, which caused the issue. imported libraries with namespace fixed the issue.
1
0
0
we are trying to pass long value to the WLDFAccessRuntime (mbean of weblogic), attribute is EarliestAvailableTimestamp & LatestAvailableTimestamp, which expects 'L' at the end. EarliestAvailableTimestamp (Default Value) cmo.getEarliestAvailableTimestamp() 1509097885002L But we are trying to change the value via wlst sc...
Need to pass long value to a variable to WLST, which expects L at end
0
0
0
121
48,876,711
2018-02-20T01:44:00.000
0
0
0
0
python,flask,virtualenv
48,877,242
4
false
1
0
You may want to look at using a requirements.txt file in Python. Using $ pip freeze > requirements.txt can build that file with what pip has installed in your virtualenv.
1
0
0
I developed a flask app running on virtualenv, how do I deploy it into production? I have a Red Hat Enterprise Linux Server release 5.6, cannot use docker. The server has cgi and wsgi setup. Python 2.7. I know using the pip install -r requirements.txt, but how do I get the virtualenv to persist on production once my se...
How to deploy flask virtualenv into production
0
0
0
2,680
48,877,570
2018-02-20T03:50:00.000
0
0
0
0
python,django,pycharm
48,877,702
1
false
1
0
you do not need to go to Create New -> Data Source -> SQlite(Xerial). if your setting.py database config is as is ('ENGINE': 'django.db.backends.sqlite3') the database is autogenerated when you run makemigrations then migrate. to recreate the database (you said you deleted): remove previous migrations (delete all f...
1
0
0
I really am at a loss here. I am using Pycharm 5.0.4 and running a virtual env with Python3 and Django 2.0.1. I am trying to get my database up and running for my project, but no matter what I do I cannot seem to get anything to show up in the database tool window drop down in Pycharm. I have 'ENGINE': 'django.db.back...
unable to see my anything in database pycharm
0
1
0
331
48,878,730
2018-02-20T05:55:00.000
2
0
1
0
python
48,878,828
2
false
0
0
In programming, function refers to a segment that groups code to perform a specific task. A module is a software component or part of a program that contains one or more routines. That means, functions are groups of code, and modules are groups of classes and functions.
1
0
0
I am a beginner of python i didn't found any difference between function and module.it is said that module stores code even after shutting the shell off rather than function.but when i tried to do so it didn't work for me.SO what is the big deal of using a module rather than function in the programming
What is the difference between python function and python module
0.197375
0
0
11,462
48,879,495
2018-02-20T06:56:00.000
2
0
1
0
python,recursion,data-structures,intel,google-colaboratory
48,922,199
4
false
0
0
There is no way to request more CPU/RAM from Google Colaboratory at this point, sorry.
1
1
0
I use GoogleColab to test data stuctures like chain-hashmap,probe-hashmap,AVL-tree,red-black-tree,splay-tree(written in Python),and I store very large dataset(key-value pairs) with these data stuctures to test some operation running time,its scale just like a small wikipedia,so run these python script will use very muc...
How to apply GoogleColab stronger CPU and more RAM?
0.099668
0
0
13,142
48,880,273
2018-02-20T07:57:00.000
2
0
0
0
python,tensorflow,neural-network,keras,multilabel-classification
49,065,611
2
false
0
0
You're on the right track. Usually, you would either balance your data set before training, i.e. reducing the over-represented class or generate artificial (augmented) data for the under-represented class to boost its occurrence. Reduce over-represented class This one is simpler, you would just randomly pick as many s...
1
8
1
I'm trying to build a multilabel-classifier to predict the probabilities of some input data being either 0 or 1. I'm using a neural network and Tensorflow + Keras (maybe a CNN later). The problem is the following: The data is highly skewed. There are a lot more negative examples than positive maybe 90:10. So my neural...
Classification: skewed data within a class
0.197375
0
0
1,027
48,880,508
2018-02-20T08:13:00.000
0
0
1
0
python,multithreading,python-2.7,asynchronous
48,881,300
2
true
0
0
Well, you have couple of options: Use multiprocessing.pool.ThreadPool (Python 2.7) where you create pool of threads and then use them for dispatching requests. map_async may be of interest here if you want to make async requests, Use concurrent.futures.ThreadPoolExecutor (Python 3) with similar way of working with Thr...
1
0
0
In order to test our server we designed a test that sends a lot of requests with JSON payload and compares the response it gets back. I'm currently trying to find a way to optimize the process by using multi threads to do so. I didn't find any solution for the problem that I'm facing though. I have a url address and ...
using threading for multiple requests
1.2
0
1
177
48,882,088
2018-02-20T09:41:00.000
0
0
0
0
python,tensorflow
48,882,154
2
false
0
0
Your computer seems to be incompatible with the library tensorflow. Your computer needs to be able to use FMA instructions but can't.
2
0
1
Python terminal getting abort with following msg: /grid/common//pkgs/python/v2.7.6/bin/python Python 2.7.6 (default, Jan 17 2014, 04:05:53) [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2 Type "help", "copyright", "credits" or "license" for more information. import tensorflow as tf 2018-02-20 01:40:11.268134...
import tensorflow with python 2.7.6
0
0
0
230
48,882,088
2018-02-20T09:41:00.000
0
0
0
0
python,tensorflow
48,882,437
2
false
0
0
You need to compile TensorFlow on the same computer.
2
0
1
Python terminal getting abort with following msg: /grid/common//pkgs/python/v2.7.6/bin/python Python 2.7.6 (default, Jan 17 2014, 04:05:53) [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2 Type "help", "copyright", "credits" or "license" for more information. import tensorflow as tf 2018-02-20 01:40:11.268134...
import tensorflow with python 2.7.6
0
0
0
230
48,883,888
2018-02-20T11:08:00.000
0
0
0
0
opencv,python-tesseract
48,884,112
1
false
0
0
Localize your detection by setting the rectangles where Tesseract has to look. You can then restrict according to rectangle which type of data is present at that place example: numerical,alphabets etc.You can also make a dictionary file for tesseract to improve accuracy(This can be used for detecting card holder name b...
1
0
1
I am working on pytesseract. I want to read data from Driving License kind of thing. Presently i am converting .jpg image to binary(gray scale) format using opencv but i am not accurate result. How do you solve this? Is there any standard size of image?
pytesseract - Read text from images with more accuracy
0
0
0
424
48,886,359
2018-02-20T13:25:00.000
3
0
1
0
python,string,optimization,coding-style
48,886,714
2
true
0
0
Maybe my_string[:-i or None]? Because -0 equals to 0, maybe it is more elegent way to convert 0 into None, that's the solution above.
1
2
0
It often happens that we need to truncate the end of a string by a certain amount. The correct way to do this is my_string[:-i]. But if your code allows i to be 0, this tuncate the whole string. The solution I generally use is to do my_string[:len(my_string)-i], which works perfectly fine. Although I have always found ...
Truncate zero characters from the end of a string
1.2
0
0
60
48,890,390
2018-02-20T16:56:00.000
0
0
0
0
python,opencv,camera,background-subtraction,opencv-contour
50,014,778
3
false
0
1
A possible cause for this error could be mild jitters in the frame that occur due to mild shaking of the camera If your background subtraction algorithm isn't tolerant enough to low-value colour changes, then a tamper alert will be triggered even if you shake the camera a bit. I would suggest using MOG2 for background ...
1
0
1
I'm trying to detect camera tampering (lens being blocked, resulting in a black frame). The approach I have taken so far is to apply background subtraction and then finding contours post thresholding the foreground mask. Next, I find the area of each contour and if the contour area is higher than a threshold value (say...
detecting when the camera view is blocked (black frame)
0
0
0
1,009
48,890,843
2018-02-20T17:20:00.000
0
0
0
1
python,amazon-web-services,erpnext
48,911,671
1
true
1
0
This is due to fail2ban which is treating no.of requests from a LAN connection as bruteforce attack and hence blocking the further requests. After purging fail2ban everything worked fine.
1
0
0
We have an ERPNext open software which is working fine on AWS Large Instance of 500 GB HDD. Recently, as it is an excess configuration for our usage, we downgraded to Medium Instance and 20 GB HDD. Also, we have changed the OS, from Ubuntu 14.x to 16.x. So the python version also got changed(i.e., Python 2.7.6 to Pytho...
ERPNext on AWS server disconnectng frequently
1.2
0
0
77
48,891,538
2018-02-20T18:02:00.000
-1
0
0
0
python,scikit-learn,one-hot-encoding
64,678,289
3
false
0
0
Basically first we need to apply fit_transform for the base data and next apply transform for the sample data, so sample data also will get the exact no.of columns w.r.t base data.
1
3
1
I have a dataset with a category column. In order to use linear regression, I 1-hot encode this column. My set has 10 columns, including the category column. After dropping that column and appending the 1-hot encoded matrix, I end up with 14 columns (10 - 1 + 5). So I train (fit) my LinearRegression model with a matri...
One-hot-encoding with missing categories
-0.066568
0
0
2,335
48,891,679
2018-02-20T18:11:00.000
2
0
0
0
python,elasticsearch,nlp
48,898,306
1
true
0
0
Your objective requires that you perform part of speech tagging on your query, and then use those tags to identify nouns. You would then need to compare the extracted nouns to a pre-curated list of food strings and, after identifying those that are not food, remove the clauses of which those nouns are the subject and /...
1
1
0
We are currently trying to process user input and checking if user has entered a food item using elastic search. With elastic search we are able to get results for wide range of terms: Garlic , Garlic Extract etc... How should we handle use cases E.g. Blueberry Dish-washing soap Or Apple based liquid soap . How do we ...
How to filter out elastic searches for invalid inputs
1.2
0
1
35
48,895,898
2018-02-20T23:31:00.000
0
0
1
0
python-3.x,tensorflow,virtualenv,python-3.4,virtualenvwrapper
49,717,503
1
true
0
0
I had faced a similar issue for the same hardware. If i am guessing right and you are following the same set of install instructions , install the. Whl for tensorflow without using sudo as using the sudo even from inside the virtual environment installs it in the place as seen by the root directory and not inside the ...
1
0
1
I have installed tensorflow and opencv on odroid xu4. Tensorflow was installed using a .whl file for raspberry pi and it built successfully. Opencv was built successfully inside virtualenv environment. I can import opencv as import cv2 from inside virtual environment for python but not tensorflow. Tensorflow is getting...
How to add directory to a python running inside virtualenv
1.2
0
0
255
48,896,407
2018-02-21T00:27:00.000
2
0
0
0
javascript,python,html,ajax,google-app-engine
48,897,992
2
false
1
0
Best Practice would be for the the script to not take 10-15 seconds. What is your script doing? Is it generating something that you can pre-compute and cache or save in Google Cloud Storage? If you're daisy-chaining datastore queries together, is there something you can do to make them happen async in tandem? If it re...
2
3
0
What is the current best practice and method of loading a webpage (that has 10 - 15 seconds worth of server side script). User clicks a link > server side runs > html page is returned (blank page for 10 - 15 seconds). User clicks a link > html page is immediately returned (with progress bar) > AJAX post request to th...
Best practice for loading webpage with long server side script
0.197375
0
1
73
48,896,407
2018-02-21T00:27:00.000
1
0
0
0
javascript,python,html,ajax,google-app-engine
48,899,196
2
true
1
0
The way we're doing it is using the Ajax approach (the second one) which is what everyone else does. You can use Task Queues to run your scripts asynchronously and return the result to front end using FCM (Firebase Cloud Messaging). You should also try to break the script into multiple task queues to make it run faster...
2
3
0
What is the current best practice and method of loading a webpage (that has 10 - 15 seconds worth of server side script). User clicks a link > server side runs > html page is returned (blank page for 10 - 15 seconds). User clicks a link > html page is immediately returned (with progress bar) > AJAX post request to th...
Best practice for loading webpage with long server side script
1.2
0
1
73