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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
46,776,659 | 2017-10-16T18:17:00.000 | 1 | 0 | 0 | 0 | python,selenium,automation,selenium-chromedriver | 46,777,247 | 2 | false | 1 | 0 | I have encountered a similar kind of situation.
My recommendation to you is speak to your front end devs or the company which provides the feedback survey and ask them for a script to disable the pop-ups for a browser session that you run.
Then, execute the script using selenium library(like JavascriptExecutor) as so... | 2 | 5 | 0 | For the past few months, I have been using Selenium to automate a very boring but essential part of my job which involves uploading forms.
Recently, the site has implemented a feed back survey which randomly pops up and switches the driver to a new frame. I have written the code which can handle this pop up and switch ... | Selenium Python - How to handle a random pop up? | 0.099668 | 0 | 1 | 2,555 |
46,776,659 | 2017-10-16T18:17:00.000 | 2 | 0 | 0 | 0 | python,selenium,automation,selenium-chromedriver | 46,777,980 | 2 | true | 1 | 0 | I've encountered this on sites that I work on also. What I've found on our site is that it's not really random, it's on a timer. So basically the way it works is a customer comes to the site. If they haven't been prompted to sign up for X, then they get a popup. If they signed up or dismissed the popup, a cookie is wri... | 2 | 5 | 0 | For the past few months, I have been using Selenium to automate a very boring but essential part of my job which involves uploading forms.
Recently, the site has implemented a feed back survey which randomly pops up and switches the driver to a new frame. I have written the code which can handle this pop up and switch ... | Selenium Python - How to handle a random pop up? | 1.2 | 0 | 1 | 2,555 |
46,776,763 | 2017-10-16T18:23:00.000 | 1 | 0 | 0 | 0 | javascript,python,node.js,client-side | 47,111,903 | 2 | true | 1 | 0 | After some research and the suggestions received, i created a chrome extension using the simple guide on the Chrome Developer site and used a CORSrequest to get what i needed.
If anyone finds this question and would like help, i am happy to provide further details/assistance :) | 2 | 1 | 0 | This is probably not the best title for this question.
So i have a nodejs application running on my server which currently uses a python script for web-scraping but i am looking at moving this to the client-side due to individual client seeing different versions (potentially unique) of the same site.
I an ideal world i... | Web Scraping on client-side | 1.2 | 0 | 1 | 1,650 |
46,776,763 | 2017-10-16T18:23:00.000 | 0 | 0 | 0 | 0 | javascript,python,node.js,client-side | 46,776,879 | 2 | false | 1 | 0 | I was recently trying to do something very similar, and unfortunately, as far as I know there's not a way to do this on the client-side. You may be able to do some trickery and "post" the data you need back you the server where you deal with it, but I don't imagine that will be very efficient or straight forward.
Thou... | 2 | 1 | 0 | This is probably not the best title for this question.
So i have a nodejs application running on my server which currently uses a python script for web-scraping but i am looking at moving this to the client-side due to individual client seeing different versions (potentially unique) of the same site.
I an ideal world i... | Web Scraping on client-side | 0 | 0 | 1 | 1,650 |
46,780,773 | 2017-10-17T00:27:00.000 | 1 | 0 | 0 | 0 | python-3.x,user-interface,focus,pyqt5,startup | 56,467,458 | 2 | false | 0 | 1 | Create a button with dimensions 0 wide by 0 high.
Set it as the default button and also early in the tab order before the other controlls that except focus; but note that it will be triggered if the user presses ENTER in some edit controls.
Call self.ui.yourbutton.setFocus() if desired for example after restore from mi... | 2 | 3 | 0 | When I start up my PyQt GUI, the focus immediately goes to the text box.
I want there to be no focus on any of the buttons at the start of the program, especially not the text box.
Is there a way to remove the focus entirely or at least move the focus to a button or something?
Thanks | PyQt: How do you clear focus on startup? | 0.099668 | 0 | 0 | 1,856 |
46,780,773 | 2017-10-17T00:27:00.000 | 1 | 0 | 0 | 0 | python-3.x,user-interface,focus,pyqt5,startup | 51,915,780 | 2 | false | 0 | 1 | clearFocus() seems to work after a certain amount of delay after the window is visible. I also used setFocus() on the QMainWindow and then the textedit field lost focus. | 2 | 3 | 0 | When I start up my PyQt GUI, the focus immediately goes to the text box.
I want there to be no focus on any of the buttons at the start of the program, especially not the text box.
Is there a way to remove the focus entirely or at least move the focus to a button or something?
Thanks | PyQt: How do you clear focus on startup? | 0.099668 | 0 | 0 | 1,856 |
46,782,575 | 2017-10-17T04:38:00.000 | 0 | 0 | 0 | 0 | python,tensorflow,deep-learning | 46,807,104 | 1 | true | 0 | 0 | pandas already has quite a bit of functionality that tf_utils provides. E.g.
read_csv could capture what I was looking for from load_dataset.
get_dummies does what convert_to_one_hot does.
I could not find any direct functionality in pandas that came close to random_mini_batches but it can be achieved with sampling a... | 1 | 0 | 1 | I am using CPU based tensorflow (on non GPU platform) from python. I want to use functionality like load_dataset, random_mini_batches, convert_to_one_hot etc. from tf_utils package. However the one from neuroailab github has dependency on tensorflow-gpu. Is there any other CPU based (for non GPU platform) equivalent pa... | Is there non-GPU equivalent of tf_utils package? | 1.2 | 0 | 0 | 462 |
46,782,716 | 2017-10-17T04:53:00.000 | 2 | 0 | 1 | 0 | python | 46,782,764 | 2 | false | 0 | 0 | I assume that tuple.__hash__() calls hash(item) for each item in the tuple and then XOR's the results together. If one of the items isn't hashable, then that will raise a TypeError that bubbles up to the original caller. | 2 | 5 | 0 | For example, the tuple (1,[0,1,2]). I understand why from a design perspective; if the tuple were still hashable, then it would be trivial to make any unhashable type hashable by wrapping it in a tuple, which breaks the correct behavior of hashability, since you can change the value of the object without changing the h... | Why is a tuple containing an unhashable type unhashable? | 0.197375 | 0 | 0 | 765 |
46,782,716 | 2017-10-17T04:53:00.000 | 5 | 0 | 1 | 0 | python | 46,782,773 | 2 | true | 0 | 0 | tuple implements its own hash by computing and combining the hashes of the values it contains. When hashing one of those values fails, it lets the resulting exception propagate unimpeded.
Being unhashable just means calling hash() on you triggers a TypeError; one way to do that is to not define a __hash__ method, but ... | 2 | 5 | 0 | For example, the tuple (1,[0,1,2]). I understand why from a design perspective; if the tuple were still hashable, then it would be trivial to make any unhashable type hashable by wrapping it in a tuple, which breaks the correct behavior of hashability, since you can change the value of the object without changing the h... | Why is a tuple containing an unhashable type unhashable? | 1.2 | 0 | 0 | 765 |
46,783,029 | 2017-10-17T05:26:00.000 | 0 | 1 | 0 | 0 | python,facebook,chatbot,messenger | 46,815,095 | 1 | true | 0 | 0 | Nope, there is no way to detect the indicator programmatically. | 1 | 0 | 0 | I'm trying to build a chatbot in FB messenger.
I could SEND typing indicator with sender action API.
However, I can't find information about receiving it.
Is there any way to do that or is it unavailable??
Thank you! | how to receive typing indicator from user in facebook messenger | 1.2 | 0 | 1 | 162 |
46,783,732 | 2017-10-17T06:23:00.000 | 1 | 0 | 0 | 0 | python,web-applications | 46,784,214 | 1 | false | 0 | 1 | If I got your idea right then you just want to create python web application.
First, you should check out python WebFrameworks and choose right one for you.
Then you should check how to work with it on your existing web server.
And last but not least (if I didn't forget anything) you should check some info on front-end... | 1 | 0 | 0 | I wrote a really simple app in Python for a school project. It is for a skillsharing community that our club is trying to start up. Imagine Venmo, but without any money involved. It's essentially a record of favors done for those in the community.
The users' info is stored as a dictionary within a dictionary of all use... | How do I make an app available online? [Python] | 0.197375 | 0 | 0 | 60 |
46,783,775 | 2017-10-17T06:26:00.000 | 0 | 1 | 1 | 0 | python,maya | 46,792,329 | 1 | true | 0 | 0 | as suggested by Andrea, I opened the commandPort of maya and connected to it using socket in python script. now i can send commands to maya using that python script as long as the maya commandPort is open. | 1 | 1 | 0 | I want to create a simple python script which will directly transfer objects from blender to Maya. I created a python script which exports the object from blender to a temp folder. now I want to import that object into Maya without actually going to Maya>file>import. I searched for the solution for a while and found ou... | how to give commands to the running instance of maya with mayapy.exe? | 1.2 | 0 | 0 | 249 |
46,784,260 | 2017-10-17T07:01:00.000 | 0 | 0 | 0 | 0 | python,tkinter | 46,797,450 | 2 | false | 0 | 1 | Can't comment so I add a short tip to the detailed Ethan answer. You can design most of the GUIs in tkinter with either pack, grid or a combination of both (by placing frames on a window with one of them, and using either grid or pack inside of each frame, to "place" the widgets). You can tune the configurations for p... | 1 | 0 | 0 | I just made an app using python and tkinter widgets.
There are Labels, Frames, Buttons, etc in the Tk and Toplevel widgets.
However, it includes thousands of codes and its really annoying to resize every widgets when I support multiple resolutions.
Is there any way to expand the resolution ratio for existing Tkinter ... | Python - is there any way to expand the resolution ratio for existing Tkinter Tk() and Toplevel() widget? (zooming-in) | 0 | 0 | 0 | 421 |
46,784,908 | 2017-10-17T07:38:00.000 | 0 | 0 | 0 | 1 | python,python-2.7,pants | 47,027,841 | 1 | false | 0 | 0 | Explicitly mentioning following versions in requirements.txt for pants builds will resolve the issue
pycparser==2.17
cryptography==2.0.1 | 1 | 0 | 0 | I try to run a dockerized pants build for a scala project and it fails with an error message "error in cryptography setup command: Invalid environment marker: python_version < '3' ".
I haven't manually specified anything to install cryptography. In the documentation of cryptography I could see that it happens either be... | Fails to install cryptography when a pants build is run | 0 | 0 | 0 | 689 |
46,785,536 | 2017-10-17T08:15:00.000 | 0 | 0 | 0 | 0 | python,web,beautifulsoup,data-extraction | 46,786,396 | 1 | true | 0 | 0 | For Google Maps, try the API. Using web scraping tools for Maps data extraction is highly discouraged by Google TOS.
If you are using Python, it has very nice libraries BeautifulSoup and Scrapy for this purpose.
Other means? You can extract POIs from OSM data, try the open source tools. Property Info? May be it's avail... | 1 | 0 | 0 | I am planning to do a data extraction from web sources (web scraping) as part of my work. I would like to extract info around my company's 10km radius.
I would like to extract information such as condominiums, its address, number of units and its price per sqft. Other things like number of schools and kindergarten in t... | data extraction from web | 1.2 | 0 | 1 | 360 |
46,789,770 | 2017-10-17T12:08:00.000 | 0 | 0 | 0 | 0 | python,directory,python-requests | 46,790,562 | 2 | true | 0 | 0 | You won't find the "corresponding functions" (=> to os.walk()) in requests because there's no concept of "directory" or "directory listing" in the HTTP protocol. All you have are urls and resources...
Given your specs ("I try to get data from my own server, so it lists directory contents"), the best you can do is pars... | 1 | 0 | 0 | I'm trying to download a directory with python3 using the requests library. I wanted to do it by "walking" (like os.walk), but never found the corresponding functions in requests.
I struggle to find another way to do it. | Trying to download a directory with requests | 1.2 | 0 | 1 | 501 |
46,789,946 | 2017-10-17T12:16:00.000 | 0 | 1 | 0 | 1 | python,kubernetes | 69,754,077 | 3 | false | 0 | 0 | For me, The reason for 500 was basically pod unable to pull the image from GCR | 2 | 2 | 0 | I'm using python kubernetes 3.0.0 library and kubernetes 1.6.6 on AWS.
I have pods that can disappear quickly. Sometimes when I try to exec to them I get ApiException Handshake status 500 error status.
This is happening with in cluster configuration as well as kube config.
When pod/container doesn't exist I get 404 err... | kubectl exec returning `Handshake status 500` | 0 | 0 | 1 | 1,730 |
46,789,946 | 2017-10-17T12:16:00.000 | 0 | 1 | 0 | 1 | python,kubernetes | 70,119,831 | 3 | false | 0 | 0 | For me the reason was,
I had two pods, with same label attached, 1 pod was in Evicted state and other was running , i deleted that pod, which was Evicted and issue was fixed | 2 | 2 | 0 | I'm using python kubernetes 3.0.0 library and kubernetes 1.6.6 on AWS.
I have pods that can disappear quickly. Sometimes when I try to exec to them I get ApiException Handshake status 500 error status.
This is happening with in cluster configuration as well as kube config.
When pod/container doesn't exist I get 404 err... | kubectl exec returning `Handshake status 500` | 0 | 0 | 1 | 1,730 |
46,790,782 | 2017-10-17T12:59:00.000 | 4 | 0 | 1 | 0 | python-3.x,spyder | 46,813,155 | 1 | false | 0 | 0 | (Spyder developer here) My answers:
Cancel the request to view the variable without closing the program?
No, that's not possible, sorry.
Set a default so Spyder will only display the first 1000 rows of very large objects such as dataframes?
That's already in place. The problem is the size in memory of your datafram... | 1 | 5 | 1 | I am working with large Pandas dataframes in Spyder. Occasionally I accidentally click the large dataframes in the Variable Explorer window and Spyder will very hang for very long periods while it tries to open.
The only way I have found to stop this process is to close Spyder completely and then reopen.
Is it possib... | Spyder IDE - Cancel opening large variables without restarting the entire program | 0.664037 | 0 | 0 | 890 |
46,791,798 | 2017-10-17T13:48:00.000 | 2 | 0 | 0 | 1 | python,amazon-web-services,amazon-ec2,deployment,ffmpeg | 46,792,730 | 1 | true | 1 | 0 | Beanstalk is certainly an option. You don't necessarily have to use it for web apps and you can configure all of the dependencies needed via .ebextensions.
Containerization is usually my go to strategy now. If you get it working within Docker locally then you have several deployment options and the whole thing gets... | 1 | 1 | 0 | I have a python project and i want to deploy it on an AWS EC2 instance. My project has dependencies to other python libraries and uses programs installed on my machine. What are the alternatives to deploy my project on an AWS EC2 instance?
Further details : My project consist on a celery periodic task that uses ffmpeg ... | What are the ways to deploy python code on aws ec2? | 1.2 | 0 | 0 | 467 |
46,792,424 | 2017-10-17T14:20:00.000 | 2 | 0 | 1 | 0 | python,dynamic,powerpoint,seaborn,figure | 49,083,874 | 3 | false | 0 | 0 | We now went with this approach:
You can save the figures as a .png file and insert this into Powerpoint. There is an Option when inserting it, that the Picture will be updated every time you open PowerPoint, retrivining a new version of the file from the Folder I saved it to. So when I make changes in Seaborn, a new ve... | 1 | 2 | 0 | I created some figures with Seaborn in a Jupyter Notebook. I would now like to present those figures in a PowerPoint presentation.
I know that it is possible to export the figures as png and include them in the presentation. But then they would be static, and if something changes in the dataframe, the picture would be... | How to use Python Seaborn Visualizations in PowerPoint? | 0.132549 | 0 | 0 | 4,350 |
46,792,940 | 2017-10-17T14:45:00.000 | 2 | 0 | 0 | 0 | python,polynomial-math,coordinate-transformation | 46,792,992 | 2 | false | 0 | 0 | Create a burner variable, store x-tau into it, and feed that into your function | 1 | 3 | 1 | I'm trying to shift a polynomial. I'm currently using numpy.poly1d() to make a quadratic equation.
example: 2x^2 + 3x +4
but I need to shift the function by tau, such that
2(x-tau)^2 + 3(x-tau) + 4
Tau is a value that will change base on some other variables in my code. | polynomial transformation in python | 0.197375 | 0 | 0 | 487 |
46,793,573 | 2017-10-17T15:15:00.000 | 0 | 0 | 1 | 0 | python,xml,python-3.6 | 46,877,010 | 1 | true | 0 | 0 | It seems the best solution was to replace 4Suite-XML with lxml given that the 4Suite-XML project is dead. In many respects, this reduced the amount of code that was needed to perform similar functions in 4Suite-XML. | 1 | 0 | 0 | I have an application that was written in Python 2.4 that I have taken over development for. I have since converted the application to Python 3, but parts of the application use 4suite-xml.
Is it possible to get 4suite-xml under Python 3?
I have tried 'pip3 install 4suite-xml' but it fails to install. | 4suite-xml for Python 3.6? | 1.2 | 0 | 0 | 188 |
46,800,824 | 2017-10-17T23:50:00.000 | 0 | 1 | 1 | 0 | python,git | 46,801,007 | 3 | false | 0 | 0 | Under your constraints, there's no difference. If there ARE staged changes, there is, though:
reset reverts staged changes.
checkout does not ... | 2 | 7 | 0 | I have a file foo.py. I have made some changes to the working directory, but not staged or commited any changes yet. I know i can use git checkout foo.py to get rid of these changes. I also read about using git reset --hard HEADwhich essentially resets your working directory, staging area and commit history to match th... | git reset --hard HEAD vs git checkout | 0 | 0 | 0 | 2,533 |
46,800,824 | 2017-10-17T23:50:00.000 | 6 | 1 | 1 | 0 | python,git | 46,800,935 | 3 | false | 0 | 0 | Is there any reason to prefer using one over the other in my case, where my changes are still in working directory?
No, since they will accomplish the same thing.
Is there any reason to prefer using [git checkout -- path/to/file] over [git reset --hard] in [general but not in my specific case]?
Yes: this will affect... | 2 | 7 | 0 | I have a file foo.py. I have made some changes to the working directory, but not staged or commited any changes yet. I know i can use git checkout foo.py to get rid of these changes. I also read about using git reset --hard HEADwhich essentially resets your working directory, staging area and commit history to match th... | git reset --hard HEAD vs git checkout | 1 | 0 | 0 | 2,533 |
46,803,803 | 2017-10-18T06:09:00.000 | 0 | 0 | 0 | 0 | python,excel,file,exe,explorer | 46,803,941 | 1 | true | 0 | 0 | Yes this is perfectly doable. I suggest you look at PyQT5 or TkInter for the user interface, pyexcel for the excel interface and pyinstaller for packaging up an executable as you asked. There are many great tutorials on all of these modules. | 1 | 0 | 0 | The program would follow the below steps:
Click on executable program made through python
File explorer pops up for user to choose excel file to alter
Choose excel file for executable program to alter
Spits out txt file OR excel spreadsheet with newly altered data to same folder location as the original spreadsheet | Python - how to get executable program to get the windows file browser to pop up for user to choose an excel file or any other document? | 1.2 | 1 | 0 | 123 |
46,808,342 | 2017-10-18T10:44:00.000 | 0 | 0 | 0 | 1 | python,redis,queue,worker | 46,808,422 | 2 | false | 0 | 0 | If your worker need to do a long task with data, it's a solution. but each data must be treated by a single worker.
By this way, you can easly (without thread,etc..) distribute your tasks, it's better if your worker doesn't work in the same server | 2 | 0 | 0 | This program listen to Redis queue. If there is data in Redis, worker start to do their jobs. All these jobs have to run simultaneously that's why each worker listen to one particular Redis queue.
My question is : Is it common to run more than 20 workers to listen to Redis ?
python /usr/src/worker1.py
python /usr/src/... | Is it common to run 20 python workers which uses Redis as Queue ? | 0 | 0 | 1 | 834 |
46,808,342 | 2017-10-18T10:44:00.000 | 0 | 0 | 0 | 1 | python,redis,queue,worker | 46,808,475 | 2 | false | 0 | 0 | Having multiple worker processes (and when I mean "multiple" I'm talking hundreds or more), possibly running on different machines, fetching jobs from a job queue is indeed a common pattern nowadays. There even are whole packages/frameworks devoted to such workflows, like for example Celery.
What is less common is try... | 2 | 0 | 0 | This program listen to Redis queue. If there is data in Redis, worker start to do their jobs. All these jobs have to run simultaneously that's why each worker listen to one particular Redis queue.
My question is : Is it common to run more than 20 workers to listen to Redis ?
python /usr/src/worker1.py
python /usr/src/... | Is it common to run 20 python workers which uses Redis as Queue ? | 0 | 0 | 1 | 834 |
46,812,351 | 2017-10-18T14:16:00.000 | 0 | 0 | 0 | 1 | python,amazon-web-services,apache-kafka,multiprocessing,scale | 46,812,799 | 2 | false | 0 | 0 | You could do this, but shouldn't.
The basic unit of parallelism in Kafka is the partition: in a consumer group, each consumer reads from one or more partitions and consumers do not share partitions. In order to share a partition, you would need to use a tool like ZooKeeper to lock access to the partition (and keep trac... | 2 | 0 | 0 | I am trying to make an application in python that has 1 topic (demo-topic) and 1 partition.
In this topic messages are pushed randomly
I have 1 consumer (consumer1) (demo-group) that uses this messages to makes some background calculations (that take some time).
Having this application on amazon i want to be able to sc... | Multiprocessing with python kafka consumers | 0 | 0 | 0 | 1,106 |
46,812,351 | 2017-10-18T14:16:00.000 | 1 | 0 | 0 | 1 | python,amazon-web-services,apache-kafka,multiprocessing,scale | 46,812,746 | 2 | false | 0 | 0 | You cannot have multiple consumers within the same group consume at the same time from the same partition.
If you subscribe a second consume within the same group to the same partition, it will act as a hot standby and won't be consuming any messages until the first one stops.
The best solution is to add partitions to ... | 2 | 0 | 0 | I am trying to make an application in python that has 1 topic (demo-topic) and 1 partition.
In this topic messages are pushed randomly
I have 1 consumer (consumer1) (demo-group) that uses this messages to makes some background calculations (that take some time).
Having this application on amazon i want to be able to sc... | Multiprocessing with python kafka consumers | 0.099668 | 0 | 0 | 1,106 |
46,814,272 | 2017-10-18T15:48:00.000 | 0 | 0 | 0 | 1 | python,bash,sockets,networking,scripting | 46,846,940 | 2 | false | 0 | 0 | its hard to understand the context and the applications structure, but i would assume that putting the connection in a separate thread would help. So that the connection is always open and the messages can be processed in preferred fashion. | 1 | 0 | 0 | I am writing a small chat app with python using bash commands. I'm using nc to accomplish this but I want to be able to append a username before the user's message. How do I go about doing this without breaking the connection?
The command I'm using to connect is just
nc -l -p 1234 -q 0
and the desired outcome is that ... | How to print text while netcat is listening at a port? | 0 | 0 | 1 | 232 |
46,815,043 | 2017-10-18T16:33:00.000 | 0 | 0 | 1 | 0 | python,queue | 48,274,477 | 1 | false | 0 | 0 | In your request queue entry include a response queue. When finished place a response on the response queue.
The requesting thread waits on the response queue.
A callback method could alternately be used. | 1 | 0 | 0 | I'm trying to write a program which starts new tasks in new threads.
Data is passed from task threads to a single worker/processing thread via a priority queue (so more important jobs are processes first).
The worker/processing thread gets higher priority data from the queue and limits calls to a REST API
How can I p... | python managing tasks in threads when using priority queue | 0 | 0 | 0 | 414 |
46,817,031 | 2017-10-18T18:37:00.000 | 1 | 0 | 0 | 0 | python-3.x,bokeh | 46,832,946 | 1 | true | 0 | 0 | This is a known bug with current versions (around 0.12.10) for now the best workaround is to increase plot.min_border (or p.min_border_left, etc) to be able to accommodate whatever the longest label you expect is. Or to rotate the labels to be parallel to the axis so that they always take up the same space, e.g. p.yaxi... | 1 | 1 | 1 | I have just started exploring bokeh and here is a small issue I am stuck with. This is in regards with live graphs.
The problem is with the axis values. Initially if I start with say 10, till 90 it shows correct values but while printing 100, it only show 10 and the last zero(0) is hidden. It's not visible.
That is wh... | Bokeh Plots Axis Value don't show completely | 1.2 | 0 | 0 | 601 |
46,817,939 | 2017-10-18T19:37:00.000 | 0 | 0 | 1 | 0 | python,database,python-3.x,mongodb,pymongo | 53,745,939 | 1 | false | 0 | 0 | After some A/B testing, it seems like there isn't really a way to speed this up, unless you change your Python interpreter. Alternatively, bulk pulling from the DB could speed this up. | 1 | 3 | 0 | After running some tests (casting a PyMongo set to a list vs iterating over the cursor and saving to a list) I've noticed that the step from cursor to data in memory is negligible. For a db cursor of about 160k records, it averages about 2.3s.
Is there anyway to make this conversion from document to object faster? Or w... | PyMongo Cursor to List Fastest Way Possible | 0 | 1 | 0 | 871 |
46,820,135 | 2017-10-18T22:20:00.000 | 1 | 0 | 1 | 0 | python,memory | 46,820,161 | 1 | true | 0 | 0 | The details depend on the OS, but in general, when a process exits, the OS deletes everything it touched - memory, file handles, sockets, etc. At least, it tries to. | 1 | 0 | 0 | TL:DR What does python do with a programs allocated memory space after it terminates?
This may seem like a basic question but I want to know what happens to, for example, a python list that contains 1000 ints after I shut down the program.
I ask this because I've recently been working with programs that have quite la... | What happens to the memory used by your program after it's finished running? | 1.2 | 0 | 0 | 36 |
46,822,710 | 2017-10-19T04:09:00.000 | 0 | 0 | 1 | 0 | python | 47,638,385 | 1 | false | 0 | 0 | A python dictionary would definitely be the easiest way to store word : definitions (key-value pairs), and you can import from or export to a json file as well. Of course, there are other structures like lists, but they are far less optimal. A pandas dataframe could work and would be useful if you wanted to have multip... | 1 | 0 | 0 | Recently I made a English word definition dictionary as described in a course in udemy.
They have used a data.json file which contains a dictionary inside it with all the words and their meaning as key value pair, so it was an easy task.
Are there some more ways to create dictionary and what data to use, like if I don... | Creating Dictionary (English dictionary ) with python | 0 | 0 | 0 | 612 |
46,823,445 | 2017-10-19T05:44:00.000 | 0 | 0 | 0 | 0 | python,dataframe | 46,823,775 | 1 | false | 0 | 0 | I think the way you are passing your argument is wrong, try passing it in the same pattern as its in csv. Like ["1/10/2011"], it should work. Good luck :) | 1 | 1 | 1 | I'am reading a data off a csv file. The columns are as below:
Date , Buy, Sell, Price
1/10/2011, 1 , 5, 500
1/15/2011, 4, 2, 500
When I tried to pull data based on index like df["2011-01-10"], I got an error KeyError: '2011-01-10'
Anyone know what this is might be the case?
Thanks, | Error when trying to pull row based on index value in the dataframe | 0 | 0 | 0 | 15 |
46,826,801 | 2017-10-19T09:30:00.000 | 0 | 0 | 1 | 0 | python,ms-word,activex | 46,828,184 | 1 | false | 0 | 0 | Seems like i mis-spelled the namespace, should be msinkaut.InkPicture.1 | 1 | 0 | 0 | I'm trying to add MSINKAUTLib.InkPicture to an existing word document using python, so far i have failed finding any documentation about that. Is it even possible? | Adding InkPicture programmatically to a word document | 0 | 0 | 0 | 59 |
46,826,969 | 2017-10-19T09:39:00.000 | 0 | 0 | 0 | 1 | python,linux,windows | 46,827,088 | 1 | true | 0 | 0 | The easiest way is to use Samba. This way you don't have to install anything on Windows.
You can do something like mount //windowspc/share /mnt, then use Python to copy files from /mnt to wherever you want.
You can call smbclient from Python as a system command
Alternatively, you can install rsync or ssh from Cygwin,... | 1 | 0 | 0 | I have some files on a remote Windows system, that I need to retrieve. It's running Windows Server 2008 R2. I would like to retrieve those files to my Ubuntu System and I would like to do it using Python. I have gone through using wmi-client-wrapper, paramiko and wmic. None of them seem to work. Some guidance would be ... | Python on Linux remotely connect to a Windows PC to retrieve files | 1.2 | 0 | 0 | 133 |
46,827,310 | 2017-10-19T09:58:00.000 | -1 | 0 | 1 | 0 | python,pycharm,pydev | 46,831,003 | 1 | false | 0 | 0 | [SOLVED]
Ok,
since in my situation the server is apache2/wsgi, when remote debugging is activated the python environment is the one used by apache/wsgi and specified in the WSGIDaemonProcess directive
Bye | 1 | 1 | 0 | I can debug my scripts in local interpreter mode in Pycharm,
but when a remote debugging environment for python is configured via:
import pydevd
add pycharm-debug-egg in path
etc
I get No module named configobj.
Module Configobj is installed in all my local python environments, so the question is: which python inter... | PyCharm: "No module named configobj" when under RemoteDebugServer | -0.197375 | 0 | 0 | 704 |
46,828,118 | 2017-10-19T10:44:00.000 | 0 | 0 | 0 | 0 | python,machine-learning,svm,naivebayes,document-classification | 46,828,277 | 2 | false | 0 | 0 | Because of the continuous score, which i assume is your label, it's a regression problem. SVMs are more common for classification problems. There are lots of possible algorithms out there. Logistic Regression would be pretty common to solve something like this.
Edit
Now that you edited your post your problem became a ... | 1 | 0 | 1 | I'm trying to classify pages, in particular search for a page, in documents based on bag of words, page layout, contain tables or not, has bold titles, etc. With this premise I have created a pandas.DataFrame like this, for each document:
page totalCharCount matchesOfWordX matchesOfWordY hasFeaturesX ... | What classification algorithm should I use for document classification with this variables? | 0 | 0 | 0 | 258 |
46,828,251 | 2017-10-19T10:52:00.000 | 3 | 0 | 0 | 0 | python,django,postgresql,database-migration | 46,828,778 | 1 | true | 1 | 0 | Make sure you have _ init _.py file under the migrations folder for that paticular app.
Running manage.py makemigrations always makes a migration file if there are any changes in your models.py
If nothing works and there isnt much data present in your database, end resolution is to delete all migrations files (if any... | 1 | 1 | 0 | When using the Django Admin panel, I am able to add new instances to Users and Groups. The same thing goes for all my apps, except for one. This one app, resultregistration, always gives me a ProgrammingError whenever I try to add a new model. For example, this app has a Competition-model where data about a sport compe... | ProgrammingError in Django when adding a new model-instance to the Database, what could be wrong? | 1.2 | 0 | 0 | 688 |
46,833,561 | 2017-10-19T15:30:00.000 | 0 | 0 | 0 | 0 | python,tcp,send | 46,833,696 | 2 | true | 0 | 0 | Option 1
Use two threads, one will write to the socket and the second will read from it.
This works since sockets are full-duplex (allow bi-directional simultaneous access).
Option 2
Use a single thread that manages all keep alives using select.epoll. This way one thread can handle multiple clients. Remember though, th... | 1 | 1 | 0 | Im trying to make a tcp communication, where the server sends a message every x seconds through a socket, and should stop sending those messages on a certain condition where the client isnt sending any message for 5 seconds.
To be more detailed, the client also sends constant messages which are all ignored by the serve... | Detecting when a tcp client is not active for more than 5 seconds | 1.2 | 0 | 1 | 53 |
46,835,221 | 2017-10-19T17:02:00.000 | 1 | 0 | 1 | 0 | python,windows,anaconda | 47,003,648 | 2 | false | 0 | 0 | I have the same problem, I rolled back to version 4.4.0. Nothing I tried worked for versions 5.0.0 and 5.0.1 | 2 | 2 | 0 | My old anaconda installation behaved strangely (updating didn't work properly but conda list did work fine).
So I decided to reinstall Anaconda, that's where the problems started. After uninstalling the old Anaconda version via the Win10 remove programs tool, I downloaded the installer from the website and installed it... | Anaconda 5.0.0 Installation on Windows 10 not working properly | 0.099668 | 0 | 0 | 989 |
46,835,221 | 2017-10-19T17:02:00.000 | 0 | 0 | 1 | 0 | python,windows,anaconda | 46,858,975 | 2 | true | 0 | 0 | Well after the Windows Fall update a reinstall solved the problem!
Seems something was amiss in the windows installation afterall! | 2 | 2 | 0 | My old anaconda installation behaved strangely (updating didn't work properly but conda list did work fine).
So I decided to reinstall Anaconda, that's where the problems started. After uninstalling the old Anaconda version via the Win10 remove programs tool, I downloaded the installer from the website and installed it... | Anaconda 5.0.0 Installation on Windows 10 not working properly | 1.2 | 0 | 0 | 989 |
46,836,289 | 2017-10-19T18:09:00.000 | 0 | 0 | 0 | 0 | python,python-2.7,search,zip | 46,899,599 | 1 | true | 0 | 0 | Use Zip module and os.walk(path) | 1 | 0 | 0 | I have many zip folders, each of them have many subfolders(subfolders includes zip folder or PDF or txt or xml). Some of them includes a file called "configuration.xml", some are not.
I want to search each zip folders and search keyword "1.2.0" in configuration.xml. print the zip folder's name if its subfolders includ... | How to Print zip file name which subfolders includes a specific string? | 1.2 | 0 | 0 | 42 |
46,837,459 | 2017-10-19T19:27:00.000 | 1 | 0 | 0 | 0 | python,pandas,latex | 61,232,784 | 1 | true | 0 | 0 | As of version 1.0.0, released on 29 January 2020, to_latex accepts caption and label arguments. | 1 | 3 | 1 | I am exporting a table from a pandas script into a .tex and would like to add a caption.
with open('Table1.tex','w') as tf:
tf.write(df.to_latex(longtable=True))
(I invoke the longtable argument to span the long table over multiple pages.)
The Table1.tex file gets imported into a bigger LaTeX document via the \impo... | pandas: create a caption with to_latex? | 1.2 | 0 | 0 | 1,703 |
46,840,384 | 2017-10-19T23:40:00.000 | 1 | 0 | 0 | 0 | python | 46,840,632 | 1 | false | 0 | 0 | On Linux you can do this with xinetd. You edit /etc/services to give a name to your port, then add a line to /etc/xinetd.conf to run your server when someone connects to that service. The TCP connection will be provide to the Python script as its standard input and output. | 1 | 0 | 0 | Im trying to build a python application that will be run on a specific port so that when i try to connect on that port the python application will be run.
Im guessing i have to do that with socket library but im not very sure about that. | Python server with library socket | 0.197375 | 0 | 1 | 46 |
46,841,117 | 2017-10-20T01:26:00.000 | 0 | 0 | 0 | 0 | python,pandas,periodicity | 46,842,124 | 1 | false | 0 | 0 | First, you need to define what output you need, then, deduce how to treat the input to get the desired output.
Regarding daily data for the first 10 years, it could be a possible option to keep only one day per week. Sub-sampling does not always mean loosing information, and does not always change the final result. It ... | 1 | 0 | 1 | I have a data set which contains 12 years of weather data. For first 10 years, the data was recorded per day. For last two years, it is now being recorded per week. I want to use this data in Python Pandas for analysis but I am little lost on how to normalize this for use.
My thoughts
Convert first 10 years data also ... | Data Periodicity - How to normalize? | 0 | 0 | 0 | 205 |
46,841,795 | 2017-10-20T03:02:00.000 | 1 | 0 | 0 | 0 | python,machine-learning,visualization | 46,845,150 | 1 | true | 0 | 0 | Feature engineering is more of art than technique. That might require domain knowledge or you could try adding, subtracting, dividing and multiplying different columns to make features out of it and check if it adds value to the model. If you are using Linear Regression then the adjusted R-squared value must increase o... | 1 | 0 | 1 | I am having a ML language identification project (Python) that requires a multi-class classification model with high dimension feature input.
Currently, all I can do to improve accuracy is through trail-and-error. Mindlessly combining available feature extraction algorithms and available ML models and see if I get luc... | Machine Learning, What are the common techniques for feature engineering and presenting the model? | 1.2 | 0 | 0 | 211 |
46,843,096 | 2017-10-20T05:55:00.000 | 0 | 0 | 0 | 1 | javascript,couchdb,backup,couchdb-futon,couchdb-python | 47,079,805 | 2 | false | 0 | 0 | Using CouchDB 1.X you can just save *.couch files corresponding to your databases. Then later you'll be able to use these files to recover your data.
Using 2.X I have no idea how to do achieve that since each database is split in shards and the _dbs.couch seems to be needed to restore data. Then you can have a complete... | 1 | 0 | 0 | I have some couchdb document need to be removed, Is there good way/steps to backup and delete and backout those document from couchdb? | Is there good way to backup and delete and backout the document from couchdb? | 0 | 0 | 0 | 225 |
46,844,090 | 2017-10-20T07:15:00.000 | 0 | 0 | 0 | 0 | python,button,lambda,tkinter | 46,853,395 | 1 | false | 0 | 1 | Just an idea but you could write a function to make a batch file and use os.startfile("batch.bat") | 1 | 0 | 0 | I have a python script that I execute from the command line, and I pass to it some parameters from there as well.
Now I'm designing the GUI to execute that script, so I want to execute the script after clicking a button, and passing the arguments from a Listbox.
I have seen some suggestions that used lambda function... | Tkinter: Passing parameters to a python script executed by button | 0 | 0 | 0 | 273 |
46,844,771 | 2017-10-20T08:03:00.000 | 0 | 0 | 0 | 0 | python,css,selenium,selenium-webdriver,ui-automation | 46,849,694 | 1 | true | 1 | 0 | Good question.
Try to use another selector, for example: css class or use xpath method contains().
Example: //div[contains(text(), "checkbox")]
I can help you if you can provide source code of the page or needed element. | 1 | 1 | 0 | one more problem i hv,i asked similar question earlier and i tried that method but not able use that methon in this problem so pls help me. it's element
html code is - Filters
So basically, question is that there is one button its kind of toggle button and i want click on that button to select device like Desktop, Tab... | id of xpath is getting changed every time in selenium python 2.7 chrome | 1.2 | 0 | 1 | 400 |
46,848,067 | 2017-10-20T11:20:00.000 | 0 | 0 | 1 | 1 | python,anaconda | 46,848,373 | 1 | false | 0 | 0 | After installing Anaconda, mostly the path environment variable is overridden hence the system now refers to the Anaconda python interpreter, a quick fix is to correct the path environment (this depends on the type of OS you're running). | 1 | 0 | 0 | I downloaded python anaconda 2.7.
I used to work with the regular python from python.org, but I was asked to work with anaconda.
any how, I have 2 problems.
right click ->edit with idle (does not exist).
can't run py file as a program (like cmd)/. | anaconda python running py file | 0 | 0 | 0 | 53 |
46,854,451 | 2017-10-20T17:36:00.000 | 22 | 0 | 1 | 0 | python,django,git,pip,virtualenv | 54,682,545 | 15 | false | 1 | 0 | If you are using a virtual environment just use the following line.
pip freeze > requirements.txt
It commands to create the requirements file first.
Or in dockerfile, RUN pip freeze > requirements.txt . | 4 | 33 | 0 | I am setting up the base for a django project, I have cloned a repo and I have just created a virtual environment for the project in the same directory.
But when I try to run the command pip install -r requirements.txt in the project directory I get this error:
[Errno 2] No such file or directory: 'requirements.txt'
I ... | pip install -r requirements.txt [Errno 2] No such file or directory: 'requirements.txt' | 1 | 0 | 0 | 123,318 |
46,854,451 | 2017-10-20T17:36:00.000 | 0 | 0 | 1 | 0 | python,django,git,pip,virtualenv | 61,945,907 | 15 | false | 1 | 0 | Check if you have requirements.txt file in the directory.
and then run the following command.
pip install -r requirements.txt | 4 | 33 | 0 | I am setting up the base for a django project, I have cloned a repo and I have just created a virtual environment for the project in the same directory.
But when I try to run the command pip install -r requirements.txt in the project directory I get this error:
[Errno 2] No such file or directory: 'requirements.txt'
I ... | pip install -r requirements.txt [Errno 2] No such file or directory: 'requirements.txt' | 0 | 0 | 0 | 123,318 |
46,854,451 | 2017-10-20T17:36:00.000 | 0 | 0 | 1 | 0 | python,django,git,pip,virtualenv | 63,977,270 | 15 | false | 1 | 0 | Make sure the requirements.txt file is in the same folder where you are installing it using pip install -r requirements.txt | 4 | 33 | 0 | I am setting up the base for a django project, I have cloned a repo and I have just created a virtual environment for the project in the same directory.
But when I try to run the command pip install -r requirements.txt in the project directory I get this error:
[Errno 2] No such file or directory: 'requirements.txt'
I ... | pip install -r requirements.txt [Errno 2] No such file or directory: 'requirements.txt' | 0 | 0 | 0 | 123,318 |
46,854,451 | 2017-10-20T17:36:00.000 | 0 | 0 | 1 | 0 | python,django,git,pip,virtualenv | 65,883,165 | 15 | false | 1 | 0 | I had this problem, 3 years too late however move the req file into downloads and then try it again | 4 | 33 | 0 | I am setting up the base for a django project, I have cloned a repo and I have just created a virtual environment for the project in the same directory.
But when I try to run the command pip install -r requirements.txt in the project directory I get this error:
[Errno 2] No such file or directory: 'requirements.txt'
I ... | pip install -r requirements.txt [Errno 2] No such file or directory: 'requirements.txt' | 0 | 0 | 0 | 123,318 |
46,854,766 | 2017-10-20T17:58:00.000 | 0 | 0 | 0 | 1 | python,luigi | 47,312,020 | 1 | false | 0 | 0 | I can tell you that mine workflow works with 10K log files every day without any glitches. The main good stuff here that I have created one task for work with each file. | 1 | 0 | 0 | My first gut reaction is that Luigi isn't suited for this sort of thing, but I would like the "pipeline" functionality and everything keeps pointing me back to Luigi/Airflow. I can't use Airflow as it is a Windows environment.
My use-case:
So currently from my “source” folder we have 20 or so machines that produce XML ... | Is Luigi suited for building a pipeline around lots of small files (100k+) | 0 | 0 | 0 | 252 |
46,855,255 | 2017-10-20T18:32:00.000 | 0 | 0 | 1 | 0 | python,parsing,dataframe,web | 46,855,571 | 1 | false | 0 | 0 | Unless you need to do that in a hurry, you could just chip off letters from the beginning or the end of the string, and check if it's a known word; if it is, cut it off and repeat. With e.g. 50k words 20 letters each, at worst you'll do 1M lookups. With a lookup taking e.g. 5ms (hitting an HDD every time), it will take... | 1 | 0 | 0 | I am trying to parse some web domains (tens of thousands) to see if they contain any English words.
It is easy for me to parse the domains to grab the main part of the domain with tldextract and then I tried to use enchant to see if they exist in the English dictionary.
The problem is I do not know how to split the do... | How to find if english words exist in string | 0 | 0 | 0 | 87 |
46,855,278 | 2017-10-20T18:33:00.000 | 1 | 0 | 1 | 0 | python,shell | 46,856,845 | 1 | false | 0 | 0 | Autocomplete and navigating history in python shell uses readline library (and module). You can check its availability by import readline.
Install readline-dev library by sudo apt-get install libreadline-dev
Recompile python
Appreciation for @user2357112 ! | 1 | 0 | 0 | I've installed python 3.6.2 from source on Linux Mint 17. Also I've python 3.4.3 with OS installation. Just noticed that autocompete on TAB in interactive shell works only in 3.4.3. In 3.6.2 it just inserts tab character.
Any solutions? | Python3.6.2 shell on TAB pressed inserts tab character instead of autocomplete. How to fix it? | 0.197375 | 0 | 0 | 72 |
46,860,616 | 2017-10-21T06:18:00.000 | 0 | 0 | 1 | 0 | java,python | 46,861,207 | 3 | true | 0 | 0 | Use kivy ,but it won't be as good as Android studio.
It is an open source framework.
The app will be working fine ,but won't be as a native Android app. | 1 | 0 | 0 | I am pursuing 7th semester btech computer science. I just want to develop a software for Mobile application and I would like to develop that software in python language instead of java. Can I proceed the software in python language? | Can I use software made up of Python language for mobile application? | 1.2 | 0 | 0 | 56 |
46,860,706 | 2017-10-21T06:34:00.000 | 0 | 0 | 1 | 0 | python,memory,time,operating-system,cpu | 46,860,767 | 1 | true | 0 | 0 | Efficient way is using time.sleep.
Second method is just sleeping (idle) the process for it's own for 1 second. It doesn't use any other resources more that itself.
First method is making an another process, which takes more memory space, CPU, etc., and waiting to end (os.system's behavior). Luckily the another process... | 1 | 0 | 0 | What is the difference between os.system("timeout 1") and time.sleep(1) in Python? I know the first one will call out the command line and let it do the timeout, but not sure how the second one make the system idle.
Also, which one can save more CPU power or make less memory occupied?
Thanks!! | What is the difference between os.system("timeout 1") and time.sleep(1)? Python | 1.2 | 0 | 0 | 372 |
46,860,891 | 2017-10-21T07:05:00.000 | 0 | 0 | 0 | 0 | python,django,django-admin,makemessages | 46,861,958 | 1 | false | 1 | 0 | I believe it should work if you did all right. Take a look at this docs part:
In addition, manage.py is automatically created in each Django
project. manage.py does the same thing as django-admin but takes care
of a few things for you:
It puts your project’s package on sys.path.
It sets the DJANGO_SETTINGS_MODULE en... | 1 | 0 | 0 | I'm using Django1.11.5 and I created makemessages.py file in "my-app/management/commands/" directory to customise makemessages command.
And I made it to execute this command by running "python ../manage.py makemessages" from my-app directory.
But I want to execute by "django-admin makemessages -l ja".
(Running "django-... | Is there any way to execute custom makemessages command by running "django-admin makemessages -l ja"? | 0 | 0 | 0 | 401 |
46,864,270 | 2017-10-21T14:24:00.000 | 4 | 1 | 0 | 0 | python,python-3.x,scikit-learn,atom-editor,hydrogen | 48,893,827 | 2 | false | 0 | 0 | I don't have high enough reputation to comment, so my barebones answer will have to be put here. I think your problem is to do with where the kernel is starting. In the Hydrogen settings, look for the option 'Directory to start kernel in'. The default is to always start in the directory in which Hydrogen was first invo... | 1 | 1 | 0 | I can run the code but trying to use the Hydrogen package in Atom I have problems importing some (not all) modules and I do not why. I do use Hydrogen with Python3.6 and i did install all needed modules with pip3.
ImportErrorTraceback (most recent call last)
in ()
----> 1 import sklearn
ImportError: No module named sk... | Importing Modules with Hydrogen in Atom | 0.379949 | 0 | 0 | 2,045 |
46,864,368 | 2017-10-21T14:34:00.000 | 1 | 1 | 1 | 0 | python,c++,constructor | 46,864,702 | 3 | true | 0 | 0 | Yes, Python's __init__ is analogous to C++'s constructor. Both are typically where non-static data members are initialized. In both languages, these functions take the in-creation object as the first argument, explicit and by convention named self in Python and implicit and by language named this in C++. In both langua... | 2 | 1 | 0 | I have worked with Python for about 4 years and have recently started learning C++. In C++ you create a constructor method for each class I I was wondering if it is correct to think that this is equivalent to the __init__(self) function in Python? Are there any notable differences? Same question for a C++ destructor me... | Python __init__ Compared to C++ Constructor | 1.2 | 0 | 0 | 1,097 |
46,864,368 | 2017-10-21T14:34:00.000 | 1 | 1 | 1 | 0 | python,c++,constructor | 46,864,771 | 3 | false | 0 | 0 | The best you can say is that __init__ and a C++ constructor are called at roughly the same point in the lifetime of a new object, and that __del__ and a C++ destructor are also called near the end of the lifetime of an object. The semantics, however, are markedly different, and the execution model of each language make... | 2 | 1 | 0 | I have worked with Python for about 4 years and have recently started learning C++. In C++ you create a constructor method for each class I I was wondering if it is correct to think that this is equivalent to the __init__(self) function in Python? Are there any notable differences? Same question for a C++ destructor me... | Python __init__ Compared to C++ Constructor | 0.066568 | 0 | 0 | 1,097 |
46,864,499 | 2017-10-21T14:48:00.000 | 1 | 0 | 1 | 0 | python-3.x,amazon-web-services,aws-lambda | 70,804,457 | 3 | false | 0 | 0 | Came across the same issue and found the solution. What you want is remove_permission() on the lambda client | 1 | 3 | 0 | I have a lambda function and for that lambda function my cloudwatch event is a trigger on it...
at the end of the lambda function i need to delete the trigger (cloud watch event ) on that lambda function programatically using python .
how can i do that ? is there any python library to do that? | Delete trigger on a AWS Lambda function in python | 0.066568 | 0 | 0 | 2,408 |
46,864,680 | 2017-10-21T15:08:00.000 | 0 | 0 | 1 | 1 | python,windows-10,virtualenvwrapper | 47,361,363 | 2 | false | 0 | 0 | mkproject is included in v1.2.4 of virtualenvwrapper-win.
There is no need to call a setup script like you would do in linux. The linux version implements virtualenvwrapper as shell functions, while virtualenvwrapper-win implements them as .bat files located in your python's Scripts directory. | 1 | 1 | 0 | Why is the virtualenvwrapper mkproject command is not working in Windows 10? And what file do you edit for shell startup in Windows 10 to setup virtualenvwrapper? | virtualenvwrapper mkproject and shell startup in windows issue? | 0 | 0 | 0 | 418 |
46,864,915 | 2017-10-21T15:35:00.000 | 1 | 0 | 0 | 0 | python-3.x,opencv,ffmpeg,opencv-python | 61,983,790 | 4 | false | 0 | 0 | You can use pygame for audio.
You need to initialize pygame.mixer module
And in the loop, add pygame.mixer.music.play()
But for that, you will need to choose audio file as well.
However, I have found better idea! You can use webbrowser module for playing videos (and because it would play on browser, you can hear sounds... | 1 | 8 | 1 | I use python cv2 module to join jpg frames into video, but I can't add audio to it. Is it possible to add audio to video in python without ffmpeg?
P.S. Sorry for my poor English | Python add audio to video opencv | 0.049958 | 0 | 0 | 19,102 |
46,865,570 | 2017-10-21T16:43:00.000 | 0 | 0 | 1 | 0 | python | 46,869,856 | 1 | false | 0 | 0 | I agree with Zindarod on multiprocessing, especially during the proof of concept phase. If you hope to hook this up at scale then I'd recommend a different system architecture. Each raspberry pi is a client which communicates with a server. This will help logically abstract tasks and make it easier to integrate with... | 1 | 0 | 0 | I am designing a traffic light signal based on image processing. I get the traffic congestion as a numeric value. I am using a RaspberryPi. I have to design a working model. Now the problem is I use time.sleep() to generate delays in the switching of lights. But during this time I cant do any other processing. so I wan... | I want to simultaneously write and read numeric values in two different python scripts | 0 | 0 | 0 | 59 |
46,867,161 | 2017-10-21T19:25:00.000 | 1 | 0 | 0 | 1 | python,google-app-engine | 46,868,601 | 1 | true | 1 | 0 | You must redeploy the service. App Engine isn't like a standard hosting site where you FTP single files, rather you upload a service that becomes containerized that can scale out to run on many instances. For a small site, this might feel weird, but consider a site serving huge amounts of traffic that might have hundre... | 1 | 0 | 0 | If I'm just updating, say, my main.py file, is there a better way to update the app then running gcloud app deploy, which takes several minutes? I wouldn't think I need to completely blow up and rebuild the environment if I'm just updating one file. | How can I update one (or a couple) files in a Google App Engine Flask App? | 1.2 | 0 | 0 | 50 |
46,867,272 | 2017-10-21T19:36:00.000 | 1 | 0 | 1 | 0 | python | 46,867,396 | 4 | false | 0 | 0 | U can use the len() function by specifying the inner sublists
movies = [ [list1] , [list2] ] ;
print(len(movies[0])); # prints length of 1st sublist
print(len(movies[1])); #prints length of second sublist | 1 | 0 | 0 | I have a list called movies with two sublists embedded it. Do the sublists have names too? I want to use len() BIF to measure all items in the list and sublists, how do I do that? | Python len function on list with embedded sublists and strings | 0.049958 | 0 | 0 | 65 |
46,869,761 | 2017-10-22T01:46:00.000 | 0 | 0 | 0 | 0 | multithreading,psycopg2,python-3.6 | 46,941,465 | 1 | false | 0 | 0 | Each thread should use a distinct connection to avoid problems with inconsistent states and to make debugging easier. On web servers, this is typically achieved by using a pooled connection. Each thread (http request processor) picks up a connection from the pool when it needs it and then returns it back to the pool wh... | 1 | 3 | 0 | I have different threads running which all write to the same database (though not the same table).
Currently I have it setup that I create a connection, and pass that to each thread, which then creates it own cursor for writing.
I haven't implementing the writing to db part yet, but am wondering if not every thread nee... | using python psycopg2: multiple cursors (1 per thread) on same connection | 0 | 1 | 0 | 2,665 |
46,871,459 | 2017-10-22T07:14:00.000 | 1 | 0 | 0 | 0 | javascript,java,python,asp.net,angularjs | 46,871,523 | 2 | false | 1 | 0 | First of all, if you don't trust one application to not clobber the log file of another one, then you have a really serious problem. `Cos the applications could also do other more harmful things. If the applications are believed to be insecure or untrustworthy, the most secure answer is to not run them at all.
If you... | 2 | 0 | 0 | I have a 5 applications(programmed in 5 different languages) deployed in one common web server and these applications are written to work on a particular task and create a log file for any action. How can we achieve a security of log file by not being over written by other applications? | Applications / code security | 0.099668 | 0 | 0 | 35 |
46,871,459 | 2017-10-22T07:14:00.000 | 0 | 0 | 0 | 0 | javascript,java,python,asp.net,angularjs | 46,872,119 | 2 | false | 1 | 0 | If your logs are stored in a commong log folder, then a simple solution would be to have proper naming for logs of different applications
e.g.
pythonApp_log_timestamp
aspNetApp_log_timestamp
This way applications will write to its designated logs and not overwrite other application's log and would work irrespective o... | 2 | 0 | 0 | I have a 5 applications(programmed in 5 different languages) deployed in one common web server and these applications are written to work on a particular task and create a log file for any action. How can we achieve a security of log file by not being over written by other applications? | Applications / code security | 0 | 0 | 0 | 35 |
46,871,609 | 2017-10-22T07:34:00.000 | 2 | 1 | 0 | 0 | rabbitmq,messaging,microservices,pika,python-pika | 56,149,895 | 1 | false | 0 | 0 | Yes of course. You can achieve that in many ways (via the same connection, different connection, same channel, different channel etc.)
What I do when I have implemented this in the past is, I create my connection, get the channel and setup my consumer with it's delegate (function). When my consume message function is c... | 1 | 3 | 0 | Could someone with Pika experience give me a quick yes/no response as to whether the following functionality is possible, or whether my thinking that it is indicates a lack of conceptual understanding of Pika.
My desired functionality:
Python service (single threaded script) has one connection to my RabbitMQ broker usi... | Can a Pika RabbitMQ client service both consume and publish messages? | 0.379949 | 0 | 0 | 1,125 |
46,871,665 | 2017-10-22T07:42:00.000 | 0 | 0 | 1 | 0 | matlab,python-3.x,memory,variable-assignment | 46,873,435 | 1 | false | 0 | 0 | You can use indexing such as x = func()[0] for the first return value, or x = func()[1] for the second. Ranges like x = func()[5:10] also work. | 1 | 0 | 0 | I want to make an assingment without allocating memory for particular elements. In MATLAB there is the ~ symbol, which acts as a placeholder and allows for the the assignment. For example,
(~,b) = deal(1,2)
can be executed without allocating any memory in the a variable ~. | python assignment placeholder for no memory allocation | 0 | 0 | 0 | 68 |
46,871,792 | 2017-10-22T07:59:00.000 | 0 | 1 | 0 | 0 | python,raspberry-pi,sandbox,iot,kaa | 48,001,019 | 1 | false | 0 | 0 | Mashid. From what I know, to use a KAA server, you should utilize the SDK obtained when you create a new application on the KAA server. This SDK also functions as an API key that will connect the device with a KAA server (on a KAA server named with Application Token). The platforms provided for using this SDK are C, C ... | 1 | 0 | 0 | I have some sensor nodes. they are connected to a Raspberry Pi 2 and send data on it. the data on Raspberry Pi is sending the data to Thingspeak.com and it shows the data from sensor nodes.
now I am developing a Kaa server and wanna see my data (from Raspberry Pi) on Kaa. is there any chance to connect the current pro... | how to connect a programmed raspberry pi to a Kaa platform? | 0 | 0 | 0 | 495 |
46,878,736 | 2017-10-22T20:16:00.000 | 1 | 1 | 0 | 0 | python,c++,ide | 46,878,851 | 1 | true | 0 | 0 | check that in dev-C++ tools > compiler options > directories > c includes and c++ includes have the path to where your Python.h is. | 1 | 1 | 0 | I'm using Dev C++. Include Python.h doesnt work, and IDE states it cant find the file or directory. I can pull up the Python.h C file, so I know I have it. How do I connect two-and-two? I imagine I have to tell my IDE where the file path is, but how would I do that? | How to get Dev C++ to find Python.h | 1.2 | 0 | 0 | 1,269 |
46,879,611 | 2017-10-22T22:06:00.000 | 0 | 0 | 0 | 0 | python,postgresql,sqlalchemy,flask-sqlalchemy | 46,879,648 | 2 | false | 0 | 0 | For simple INSERTs, yes, you can safely have four producers adding rows. I'm assuming you don't have long running queries, as consistent reads can require allocating an interesting amount of log space if inserts keep happening during an hour-long JOIN.
if I am inserting large amounts of data and one insert causes anot... | 2 | 2 | 0 | I have a PostgreSQL database in which I am collecting reports from 4 different producers. Back when I wrote this I defined 4 different schemas (one per producer) and since the reports are similar in structure each schema has exactly the same tables inside. I'd like to combine the schemas into one and add an extra colum... | Can I safely combine my schemas | 0 | 1 | 0 | 80 |
46,879,611 | 2017-10-22T22:06:00.000 | 1 | 0 | 0 | 0 | python,postgresql,sqlalchemy,flask-sqlalchemy | 46,879,647 | 2 | true | 0 | 0 | This won't be a problem if you are using a proper db such as Postgres or MySQL. They are designed to handle this.
If you are using sqlite then it could break. | 2 | 2 | 0 | I have a PostgreSQL database in which I am collecting reports from 4 different producers. Back when I wrote this I defined 4 different schemas (one per producer) and since the reports are similar in structure each schema has exactly the same tables inside. I'd like to combine the schemas into one and add an extra colum... | Can I safely combine my schemas | 1.2 | 1 | 0 | 80 |
46,885,005 | 2017-10-23T08:33:00.000 | 2 | 0 | 1 | 0 | pip,anaconda,python-3.6 | 46,904,976 | 1 | true | 0 | 0 | I have a solutions:
1, First open Anaconda Navigator , and install 'setuptools'
2, open Anaconda prompt and input 'easy_install pip'
pip work properly | 1 | 0 | 0 | I downloaded Anaconda3 and create new enviroment env_python36_for_dl , when i open terminal, the error appear as
Traceback (most recent call last):
File "C:\Users\Yurak\AppData\Local\conda\conda\envs\env_python36_for_dl\Scripts\pip-script.py", line 3, in <module>
import pip
File "C:\Users\Yurak\AppData\Local\... | Anaconda3 new environments pip `AttributeError: '_NamespacePath' object has no attribute 'sort'` | 1.2 | 0 | 0 | 477 |
46,886,704 | 2017-10-23T10:05:00.000 | 4 | 0 | 1 | 0 | python,python-2.7,python-module,pyc | 46,929,991 | 2 | false | 0 | 0 | Even as compiled bytecode, names in modules are still strings. As long as the interfaces of the modules are compatible the code will still work with different module versions. | 1 | 2 | 0 | Suppose I compile some python files (.py to .pyc / .pyo) containing code using modules like NumPy, SciPy, MatPlotLib. If I execute them on another configuration (i.e. the client), is it required that versions of modules are the same ? Or have I only to be in the range of compatible versions ? | Compatibility of versions for compiled Python code using modules | 0.379949 | 0 | 0 | 233 |
46,886,770 | 2017-10-23T10:08:00.000 | 1 | 0 | 0 | 0 | python,tensorflow,neural-network | 46,887,660 | 2 | false | 0 | 0 | A simple option would be to replicate W. If the original W is, lets say p X q, you can just do l = tf.matmul(X, tf.tile(W, (k, 1))). | 1 | 0 | 1 | I am trying to build a neural network with shared input weights.
Given pk inputs in the form X=[x_1, ..., x_p, v_1,...,v_p,z1,...,z_p,...] and a weight matrix w of shape (p, layer1_size), I want the the first layer to be defined as sum(w, x_.) + sum(w, v_.) + ....
In other words the input and the first layer shoul... | Tensorflow share weights across input placeholder | 0.099668 | 0 | 0 | 547 |
46,887,360 | 2017-10-23T10:38:00.000 | 0 | 0 | 0 | 1 | python,ping,command-window,stream-operators | 46,953,793 | 1 | true | 0 | 0 | It works with os.system('powershell "ping 127.0.0.1 -t | tee ping.txt') | 1 | 0 | 0 | Using os.system('ping 127.0.0.1 -t >> new.txt'). I am able to get the ping result in new.txt document. How to get the ping result in command window and text file at the same time in case of stream output like this...? | How to get stream output in command window and text document simultaneously | 1.2 | 0 | 0 | 62 |
46,887,939 | 2017-10-23T11:10:00.000 | 0 | 0 | 1 | 0 | python,linux,bash,shell,anaconda | 47,472,416 | 1 | true | 0 | 0 | Having experimented with both approaches over the last couple of weeks I have settled on the first option: Adding the Anaconda binary path to the PATH variable in user .bashrc files.
I have found the benefits of this method to be:
Regardless of whether the Anaconda activate script is sourced in the user's .bashrc, whe... | 1 | 4 | 0 | I would like to move to Anaconda Python as my default Python environment.
In order to use Anaconda over the system Python I have been looking at the following two options:
Adding the Anaconda bin path to my bash PATH variable (in my .bashrc) so that the Anaconda binaries take precedence over those elsewhere on the sys... | Sourcing Anaconda activate script vs. adding the Anaconda bin directory to PATH | 1.2 | 0 | 0 | 553 |
46,893,461 | 2017-10-23T15:49:00.000 | 1 | 0 | 1 | 0 | python,import,pycharm | 46,893,773 | 4 | false | 0 | 0 | File >> Settings >> Project interpreter. You should see a list of currently installed packages/libraries. If the module is not specified in there click the plus sign and look for your module in there. Also make sure you specify it correctly when you import it. | 4 | 2 | 0 | I can't import standard math module in pycharm, I'm getting an error: "No module named math", from python shell I can import it, what can cause that? | Pycharm cannot import math module | 0.049958 | 0 | 0 | 21,831 |
46,893,461 | 2017-10-23T15:49:00.000 | 3 | 0 | 1 | 0 | python,import,pycharm | 46,991,033 | 4 | true | 0 | 0 | Check that you are pointing to the correct python file within Settings > Project > Project Interpreter.
When I've had this problem in the past my interpreter was pointing at python3.6 and not python within the bin folder of my venv. I simply dropped the interpreter and added it again pointing to the venv-name/bin/pytho... | 4 | 2 | 0 | I can't import standard math module in pycharm, I'm getting an error: "No module named math", from python shell I can import it, what can cause that? | Pycharm cannot import math module | 1.2 | 0 | 0 | 21,831 |
46,893,461 | 2017-10-23T15:49:00.000 | 0 | 0 | 1 | 0 | python,import,pycharm | 47,998,476 | 4 | false | 0 | 0 | I had a similar issue and was able to fix it by creating a new Python system interpreter. Project Interpreter -> Add Local -> System Interpreter -> /usr/local/bin/python3 | 4 | 2 | 0 | I can't import standard math module in pycharm, I'm getting an error: "No module named math", from python shell I can import it, what can cause that? | Pycharm cannot import math module | 0 | 0 | 0 | 21,831 |
46,893,461 | 2017-10-23T15:49:00.000 | 0 | 0 | 1 | 0 | python,import,pycharm | 63,342,979 | 4 | false | 0 | 0 | import math -> instead of using "print(sqrt(25))" use "print(math.sqrt(25))" (here sqrt is for exp. only) | 4 | 2 | 0 | I can't import standard math module in pycharm, I'm getting an error: "No module named math", from python shell I can import it, what can cause that? | Pycharm cannot import math module | 0 | 0 | 0 | 21,831 |
46,894,762 | 2017-10-23T17:02:00.000 | 1 | 0 | 1 | 0 | python,tkinter,pycharm,tk,python-3.6 | 51,811,625 | 6 | false | 0 | 1 | install Packages : 'future' import tkinter | 4 | 2 | 0 | I've been playing around with tkinter a lot at my school using pycharm, but when i go home and use the pycharm on my pc, the module is not installed for tkinter. I can't seem to find how to install it. I am running python 3.6. I do not have python running on cmd.exe. All help is appreciated, thanks. | How to install tkinter onto pycharm | 0.033321 | 0 | 0 | 15,283 |
46,894,762 | 2017-10-23T17:02:00.000 | 0 | 0 | 1 | 0 | python,tkinter,pycharm,tk,python-3.6 | 65,334,470 | 6 | false | 0 | 1 | Depending on your setup, you may need to uninstall and reinstall Pycharm. I had this problem on Linux Mint 20, and the issue was I was using the Flathub version of Pycharm. I uninstalled, and downloaded pycharm from the website, installed through terminal and suddenly everything works. | 4 | 2 | 0 | I've been playing around with tkinter a lot at my school using pycharm, but when i go home and use the pycharm on my pc, the module is not installed for tkinter. I can't seem to find how to install it. I am running python 3.6. I do not have python running on cmd.exe. All help is appreciated, thanks. | How to install tkinter onto pycharm | 0 | 0 | 0 | 15,283 |
46,894,762 | 2017-10-23T17:02:00.000 | -3 | 0 | 1 | 0 | python,tkinter,pycharm,tk,python-3.6 | 58,871,000 | 6 | false | 0 | 1 | In pycharm project interpreter you need to install future package
then restart pycharm, after that use import tkinter.
Remember to use lower case. | 4 | 2 | 0 | I've been playing around with tkinter a lot at my school using pycharm, but when i go home and use the pycharm on my pc, the module is not installed for tkinter. I can't seem to find how to install it. I am running python 3.6. I do not have python running on cmd.exe. All help is appreciated, thanks. | How to install tkinter onto pycharm | -0.099668 | 0 | 0 | 15,283 |
46,894,762 | 2017-10-23T17:02:00.000 | 0 | 0 | 1 | 0 | python,tkinter,pycharm,tk,python-3.6 | 50,565,829 | 6 | false | 0 | 1 | Just import Tkinter with lowercase t: import tkinter as tk | 4 | 2 | 0 | I've been playing around with tkinter a lot at my school using pycharm, but when i go home and use the pycharm on my pc, the module is not installed for tkinter. I can't seem to find how to install it. I am running python 3.6. I do not have python running on cmd.exe. All help is appreciated, thanks. | How to install tkinter onto pycharm | 0 | 0 | 0 | 15,283 |
46,895,616 | 2017-10-23T17:54:00.000 | 2 | 0 | 1 | 0 | python,python-3.x,ipython | 46,895,617 | 1 | true | 0 | 0 | It appears that I was working in ipython and that the builtin sum function was masked by "function sum in module numpy.core.fromnumeric" (according to help(sum)). I suspect an effect of having issued the command %pylab.
__builtin__.sum(map(len, ["a", "aa", "aaa"])) gives the expected 6. | 1 | 3 | 0 | sum(map(len, ["a", "aa", "aaa"])) gives me a map instead of a number.
I expected this to give the same result as sum(len(thing) for thing in ["a", "aa", "aaa"]) (that is 6).
I see that list(sum(map(len, ["a", "aa", "aaa"]))) returns me [1, 2, 3], as if the sum had no effect.
I assume there is a reason for such a behavi... | Intended effect of sum over a python map | 1.2 | 0 | 0 | 304 |
46,895,772 | 2017-10-23T18:05:00.000 | 1 | 0 | 0 | 0 | python,image,numpy,opencv,image-processing | 58,123,095 | 3 | false | 0 | 0 | I'd take a look at morphological operations. Dilation sounds closest to what you want. You might need to work on a subregion with your line if you don't want to dilate the rest of the image. | 1 | 8 | 1 | I'm using OpenCV to do some image processing on Python. I'm trying to overlay an outline on an image where the outline was made from a mask. I'm using cv2.Canny() to get the outline of the mask, then changing that to a color using cv2.cvtColor() then finally converting that edge to cyan using outline[np.where((outline ... | Thicken a one pixel line | 0.066568 | 0 | 0 | 7,385 |
46,897,003 | 2017-10-23T19:22:00.000 | 2 | 0 | 0 | 0 | python,python-docx | 46,897,992 | 1 | false | 0 | 0 | There are a few different possibilities your description would admit, but none of them have direct API support in python-docx.
The simplest case is copying a table from one part of a python-docx Document object to another location in the same document. This can probably be accomplished by doing a deep copy of the XML f... | 1 | 0 | 0 | I want to add docx.table.Table and docx.text.paragraph.Paragraph objects to documents.
Currently
table = document.add_table(rows=2, cols=2)
Would create a new table inside the document, and table would hold the docx.table.Table object with all its properties.
What I want to do instead is add a table OBJECT to the do... | python-docx add table object to document | 0.379949 | 1 | 0 | 1,713 |
46,897,967 | 2017-10-23T20:29:00.000 | 1 | 0 | 1 | 1 | python,linux,centos,yum,system-configuration | 46,924,884 | 1 | false | 0 | 0 | Sure, but you'll have to do it the hard way. Dig through /usr/local looking for anything Python-related and remove it. The python in /usr/bin should be revealed once the one in /usr/local/bin is removed.
Also, next time make altinstall. It will install a versioned executable that won't get in the way of the native exec... | 1 | 2 | 0 | I accidentally downloaded python2.6.6 on my centos Virtual Machine from python.org's official download package and compiled it to source.
Now in my /usr/local/bin I have a python2.6 shell available and now if I use which python it will give me the path of /usr/local/bin instead of original python2.7's path which is /us... | Uninstall python 2.6 without yum | 0.197375 | 0 | 0 | 2,370 |
46,898,131 | 2017-10-23T20:40:00.000 | 4 | 1 | 0 | 0 | java,python | 46,918,732 | 1 | true | 0 | 0 | I think you missed the part where it says
but no group of (num_required - 1) bunnies can.
I can explain my solution further, but I will ruin the fun. (I'm the owner of that repo).
Let's try it with your answer.
[[0], [0, 1, 2], [0, 1, 2], [1], [2]]
Your consoles are 3. Bunny 2 can open it on its own, Bunny 3 can open ... | 1 | 3 | 0 | I'm working my way through Google Foobar and I'm very confused about "Free the Bunny Prisoners". I'm not looking for code, but I could use some insight from anyone that's completed it. First, the problem:
Free the Bunny Prisoners
You need to free the bunny prisoners before Commander Lambda's space
station explodes... | Google Foobar: Free the Bunny Prisoners clarification | 1.2 | 0 | 0 | 4,292 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.