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
38,847,743
2016-08-09T10:03:00.000
1
0
0
0
python,r,dataframe,google-bigquery
39,119,230
1
true
0
0
It looks like bigrquery package does the job with insert_upload_job(). In the package documentation, it says this function > is only suitable for relatively small datasets but it doesn't specify any size limits. For me, it's been working for tens of thousands of rows.
1
0
1
I know it's possible to import Google BigQuery tables to R through bigrquery library. But is it possible to export tables/data frames created in R to Google BigQuery as new tables? Basically, is there an R equivalent of Python's temptable.insert_data(df) or df.to_sql() ? thanks for your help, Kasia
Exporting R data.frame/tbl to Google BigQuery table
1.2
1
0
635
38,847,922
2016-08-09T10:10:00.000
0
0
1
0
python,pdf-generation,pypdf2
42,619,596
1
false
0
0
In PyPdf2, you can use get a pageObject which is a dictionary. You can then search for key = '/Annots' and its values in it. You can at least know whether page is having highlighted text or not.
1
3
0
I am currently trying to use PyPDF2 to read the PDF file in the Python.I want to know whether the text of the PDF file is highlighted or not. Context: We use to highlight text in PDF file with a different color.Is there any way to know which text is highlighted in Python using any library or so? If there is please dir...
Finding text whether it is highlighted or not
0
0
0
304
38,853,094
2016-08-09T14:07:00.000
1
0
1
0
python,linux,ole,visio
38,855,285
2
true
0
0
You have really picked a strong enemy :) Unlike other office apps Visio .vsd binary file format is not exactly Microsoft's "compound document", that's basically just a wrapper. The format was created by Visio Corp back in 199x, and AFAIK was never actually publicly documented. I would really recommend you NOT to go wi...
1
1
0
I am trying to read the contents of a Visio Binary .VSD file which contains information from a graph I have made. I have tried using the OLE Tools and OLEFile but cannot correctly read the contents. I can view the file with the OLETools. When I dump the contents and view it with the 'xxd' command (in terminal) i can't...
Reading data from a VSD (Windows Visio Binary) File in Python (Linux) with OLE Tools is very unclear, is there any other way to extract the data?
1.2
0
0
2,852
38,854,382
2016-08-09T15:06:00.000
0
0
0
0
apache,flask,python-requests
38,869,412
1
false
1
0
Dirn was completely right, it turned out not to be an Apache issue at all. It was SQL Alchemy all along. I imagine that SQL Alchemy knows not to do any 'caching' when it requests data on the development server but decides that it's a good idea in production, which makes perfect sense really. It was not using the commit...
1
0
0
I am running a Flask app on an Apache 2.4 server. The app sends requests to an API built by a colleague using the Requests library. The requests are in a specific format and constructed by data stored in a MySQL database. The site is designed to show the feedback from the API on the index, and the user can edit the dat...
Apache server seems to be caching requests
0
1
0
83
38,856,271
2016-08-09T16:42:00.000
1
0
0
1
python,r,shell,command-line
38,856,331
3
true
0
0
You probably already have R, since you can already run your script. All you have to do is find its binaries (the Rscript.exe file). Then open windows command line ([cmd] + [R] > type in : "cmd" > [enter]) Enter the full path to R.exe, followed by the full path to your script.
2
4
0
I'm currently trying to run an R script from the command line (my end goal is to execute it as the last line of a python script). I'm not sure what a batch file is, or how to make my R script 'executable'. Currently it is saved as a .R file. It works when I run it from R. How do I execute this from the windows comman...
Running an R script from command line (to execute from python)
1.2
0
0
3,887
38,856,271
2016-08-09T16:42:00.000
3
0
0
1
python,r,shell,command-line
38,856,393
3
false
0
0
You already have Rscript, it came with your version of R. If R.exe, Rgui.exe, ... are in your path, then so is Rscript.exe. Your call from Python could just be Rscript myFile.R. Rscript is much better than R BATCH CMD ... and other very old and outdated usage patterns.
2
4
0
I'm currently trying to run an R script from the command line (my end goal is to execute it as the last line of a python script). I'm not sure what a batch file is, or how to make my R script 'executable'. Currently it is saved as a .R file. It works when I run it from R. How do I execute this from the windows comman...
Running an R script from command line (to execute from python)
0.197375
0
0
3,887
38,858,195
2016-08-09T18:43:00.000
-2
0
1
0
python,virtualenv,jupyter
38,859,614
1
false
0
0
you can use tox to setup multiple virtualenvs instead ... that would generally be the standard solution
1
0
0
I want to use jupyter with both the versioned kernel of python in a virtualenv. How can I do that?
Is there a way to use python 2.x and 3.x in same virtualenv?
-0.379949
0
0
68
38,858,553
2016-08-09T19:04:00.000
-1
0
0
0
mysql,django,oracle,python-2.7
38,858,633
1
false
1
0
Basically write models that match what you want your destination tables to be and then write something to migrate data between the two. I'd make this a comment if I could but not enough rep.
1
0
0
Right now in Django, I have two databases: A default MySQL database for my app and an external Oracle database that, for my purposes, is read-only There are far more tables in the external database than I need data from, and also I would like to modify the db layout slightly. Is there a way I can selectively choose ...
How do you selectively sync a database in Django?
-0.197375
1
0
218
38,862,088
2016-08-09T23:38:00.000
3
1
0
0
python,linux,yocto,bitbake,openembedded
38,865,576
4
false
0
0
The OE layer index at layers.openembedded.org lists all known layers and the recipes they contain, so searching that should bring up the meta-python layer that you can add to your build and use recipes from.
1
13
0
I wish to add more python modules to my yocto/openembedded project but I am unsure how to? I wish to add flask and its dependencies.
How do I add more python modules to my yocto/openembedded project?
0.148885
0
0
20,667
38,865,708
2016-08-10T06:23:00.000
0
0
1
0
python,raspberry-pi,scikit-learn
38,866,597
2
false
0
0
scikit-learn will run on a Raspberry Pi just as well as any other Linux machine. To install it, make sure you have pip3 (sudo apt-get install python3-pip), and use sudo pip3 install scikit-learn. All Python scripts utilizing scikit-learn will now run as normal.
1
0
0
I'm new in embedded programming, and would like to understand what I need to do to run python scikit-learn on a capable embedded processor. See Raspberry Pi as an example.
How can I run python scikit-learn on Raspberry Pi?
0
0
0
18,641
38,866,244
2016-08-10T06:54:00.000
0
1
0
0
python,pytest,python-2.6
38,869,743
2
false
0
0
Unfortunately pytest < 3.0 "hides" the ImportError happening when failing to import a plugin. If you remove all plugin arguments but add -rw, you should be able to see what exactly is going wrong in the warning summary.
1
1
0
I am new to pytest and I have python2.6 installed on my setup. I installed pytest and the testcases get executed properly. I installed couple of plugins like pytest-timeout, putest-xdist etc but these plugins does not load when I run the cases. For timeout, I get following error: py.test: error: unrecognized arguments...
Does pytest plugins work with python2.6
0
0
0
128
38,866,649
2016-08-10T07:18:00.000
1
0
0
1
python-2.7,http,tornado,broadcast
38,866,860
2
true
0
0
Short answer: you might be interested in WebSockets. Tornado seems to have support for this. Longer answer: I assume you're referring to broadcast from the server to all the clients. Unfortunately that's not doable conceptually in HTTP/1.1 because of the way it's thought out. The client asks something of the server, an...
1
1
0
I have a tornado HTTP server. How can I implement broad-cast message with the tornado server? Is there any function for that or I just have to send normal HTTP message all clients looping. I think if I send normal HTTP message, the server should wait for the response. It seems not the concept of broad-cast. Otherwise, ...
How can I send HTTP broadcast message with tornado?
1.2
0
0
544
38,866,665
2016-08-10T07:19:00.000
0
0
0
0
syntax-error,stdin,qpython
38,874,758
1
false
0
1
I am editing my last answer: I was mistaken when I read the text and the error was my fault. Be sure and read thoroughly to avoid mistakes.
1
0
0
I am using QPython on my Samsung Android V. I am studying from the book Think Python. The topic is about Adding New Functions such as: def print_lyrics: print ("I am a lumberjack and I work all day." Etc. But when I attempt to run it I get an error saying, File "", line 1 error. 1. I looked on Google but could not fin...
File "", line 1 error In QPython When Running def Function
0
0
0
474
38,869,507
2016-08-10T09:34:00.000
1
1
0
1
php,android,python,linux,exec
38,870,240
2
false
0
0
First Check your python PATH using "which python" command and check result is /usr/bin/python. Check your "TestCode.py" if you have written #!/usr/bin/sh than replace it with #!/usr/bin/bash. Than run these commands exec('/usr/bin/python /var/www/html/Source/TestCode.py', $result); echo $result
1
1
0
I am making an android application in which I am first uploading the image to the server and on the server side, I want to execute a Python script from PHP. But I am not getting any output. When I access the Python script from the command prompt and run python TestCode.py it runs successfully and gives the desired outp...
Execution of a Python Script from PHP
0.099668
0
0
173
38,870,823
2016-08-10T10:28:00.000
0
0
0
0
python,database,matlab,oop,time-series
38,870,995
1
true
0
0
For current computers 30 years of day by day data amounts to almost nothing if your dayly data remains below say 10kB. Since your simulation may need efficient retrieval, especially if it combines data from different dates, I'd read all the data in memory in one query and then start processing. What is considered elega...
1
0
0
I am writing an application that uses historical time series data to perform simulations. Is it better for application to load the data from the database into local data wrapper classes before executing the main loop (up to 30 years day by day) or connect to the database each day to pull the required data? Which is mor...
Database to wrapper-classes or direct connectivity to database for time-series simulation application?
1.2
1
0
15
38,873,603
2016-08-10T12:35:00.000
0
0
1
0
python,pip
38,873,722
2
false
0
0
Yes, pip install will execute remote code with your user access; anything could have happened that you as a user can do on your computer without admin access. Now, usually the setup.py file of a project does nothing more than just install the project files into your Python site-packages dir (and optionally to bin/ or S...
1
0
0
Recently, I have been exploring github and went on an install spree using "pip install -r requirements.txt". Today, I came across one that required my antivirus to give permission. Felt suspicious, but I installed it anyway. pip install git+https://github.com/something Usually, command "python something.py" would execu...
Can a pip install have detrimental effects to your computer?
0
0
0
302
38,875,222
2016-08-10T13:44:00.000
0
0
0
0
python,openerp,odoo-8,dashboard
38,877,250
3
false
1
0
I fear without changing some base elements of Odoo there is no other solution than duplicating the views and change the user, because the field user is required.
2
0
0
How can I share my customized dashboard for all users, I found that every customized dashboard created is stored on customized views, then to share a dashboard you should duplicate the customized view corresponding to that dashboard, and change the user field. Is there a better solution ?
Share Odoo Dashboard to all users
0
0
0
1,484
38,875,222
2016-08-10T13:44:00.000
0
0
0
0
python,openerp,odoo-8,dashboard
69,828,393
3
false
1
0
There is a record rule that prevents other users to see one's dashboard, disabling that record rule will make visible one dashboard to other
2
0
0
How can I share my customized dashboard for all users, I found that every customized dashboard created is stored on customized views, then to share a dashboard you should duplicate the customized view corresponding to that dashboard, and change the user field. Is there a better solution ?
Share Odoo Dashboard to all users
0
0
0
1,484
38,875,927
2016-08-10T14:15:00.000
3
0
0
0
python,django,postgresql,sqlite,django-models
38,875,962
1
true
1
0
hstore is specific to Postgres. It won't work on sqlite. If you just want to store JSON, and don't need to search within it, then you can use one of the many third-party JSONField implementations.
1
2
0
I am using sqlite (development stage) database for my django project. I would like to store a dictionary field in a model. In this respect, i would like to use django-hstore field in my model. My question is, can i use django-hstore dictionary field in my model even though i am using sqlite as my database? As per my ...
Django hstore field in sqlite
1.2
1
0
912
38,875,969
2016-08-10T14:16:00.000
0
0
1
0
python-3.x,gtk3,pygobject
39,381,937
1
false
0
0
No, although you can implement that logic yourself in your code. What you may have read is that you can install a separate icon theme using the Icon Naming Spec names, and applications will fall back to the default hicolor icon theme in the case where your icon theme is missing an icon?
1
0
0
If my memory is not deceiving me, I read somewhere that you can use the system icons (Icon Naming) as second option if the "primary" is not available. In other words, we can choose an icon that is in a directory any and if it is not available a system icon (Icon Naming Specification) is used. This is possible or am I m...
Icon Naming Specification as Second Option
0
0
0
34
38,876,441
2016-08-10T14:36:00.000
1
0
1
0
python,json,string,list,pickle
38,876,740
1
false
0
0
If the first script just writes the file once and then at some point the second script has to read it, I would use csv (or just plain text and the elements separated by a coma). If the second file has to read periodically the strings that the first writes I would use a socket to send it to the second script.
1
2
0
I will create two Python scripts. One will generate strings and save them to a file. The other will traverse through the list of string from the top down, do operations on each string and then delete the string when done. I would like to know which file type can best satisfy this purpose (e.g. pickle, json, plain text,...
Best way to save/load list of strings and the file will be manipulated by two Python scripts at the same time
0.197375
0
0
73
38,876,721
2016-08-10T14:47:00.000
9
0
1
0
python,flask
38,876,910
2
false
1
0
How many requests will my application be able to handle concurrently with this statement? This depends drastically on your application. Each new request will have a thread launched- it depends on how many threads your machine can handle. I don't see an option to limit the number of threads (like uwsgi offers in a pr...
1
81
0
What exactly does passing threaded = True to app.run() do? My application processes input from the user, and takes a bit of time to do so. During this time, the application is unable to handle other requests. I have tested my application with threaded=True and it allows me to handle multiple requests concurrently.
Handle Flask requests concurrently with threaded=True
1
0
0
80,066
38,877,514
2016-08-10T15:19:00.000
2
1
0
0
python,vlc,libvlc
38,877,998
1
true
0
0
In an MPEG stream, there is no such thing as "songs". It's just an audio stream. Some radio stations do change metadata in between, so you might be able to check whether the stream title changes or something. But that's purely heuristic. I guess the notification you see is also triggered by the metadata change.
1
0
0
I'm new to using programming vlc, I'm using python specifically python-vlc to play a internet radio station. I have it playing the station but can't get the current track that is playing. When I get the audio track info it returns Track 1 all the time. Anyways, I am looking for a way to get the song change event. It s...
VideoLan song change event for radio stream
1.2
0
0
398
38,879,399
2016-08-10T16:56:00.000
0
0
1
0
python,visual-studio
51,743,400
1
false
0
0
Visual Studio is displaying the contents of stdout and stderr. When each thread and finally the entire program exits, it'll show that they exited and the code they returned when they exited. Your program doesn't print anything to stdout or stderr, which is why no output appears before the program exits. Your problem wi...
1
0
0
I am using visual studio, when I run this code below I am getting this message and the program did not run correctly: The thread 'MainThread' (0x339c) has exited with code 0 (0x0). The program '[10996] python.exe' has exited with code 0 (0x0). from selenium import webdriver path = chrome_path = r'C:\Program Files (x86)...
The thread 'MainThread' (0x339c) has exited with code 0 (0x0)
0
0
1
1,551
38,880,555
2016-08-10T18:04:00.000
2
1
0
1
python,email,google-app-engine,cron
38,884,139
2
true
1
0
You can easily accomplish what you need with Task API. When you create a task, you can set an ETA parameter (when to execute). ETA time can be up to 30 days into the future. If 30 days is not enough, you can store a "send_email" entity in the Datastore, and set one of the properties to the date/time when this email sho...
1
0
0
I want to be able to schedule an e-mail or more of them to be sent on a specific date, preferably using GAE Mail API if possible (so far I haven't found the solution). Would using Cron be an acceptable workaround and if so, would I even be able to create a Cron task with Python? The dates are various with no specific ...
Is there a way to schedule sending an e-mail through Google App Engine Mail API (Python)?
1.2
0
0
197
38,882,845
2016-08-10T20:22:00.000
0
0
1
1
python,python-2.7,python-3.x,ubuntu,anaconda
46,602,056
2
false
0
0
Use anaconda version Anaconda3-4.2.0-Linux-x86_64.sh from the anaconda installer archive.This comes with python 3.5. This worked for me.
1
1
0
Anaconda for python 3.5 and python 2.7 seems to install just as a drop in folder inside my home folder on Ubuntu. Is there an installed version of Anaconda for Ubuntu 16? I'm not sure how to ask this but do I need python 3.5 that comes by default if I am also using Anaconda 3.5? It seems like the best solution is d...
How to get Python 3.5 and Anaconda 3.5 running on ubuntu 16.04?
0
0
0
3,184
38,885,944
2016-08-11T01:30:00.000
0
0
0
1
python,logging,windows-ce,data-analysis
38,886,144
2
false
0
0
There is no input data at all to this problem so this answer will be basically pure theory, a little collection of ideas you could consider. To analize patterns out of a bunch of many logs you could definitely creating some graphs displaying relevant data which could help to narrow the problem, python is really very g...
1
0
0
My company has slightly more than 300 vehicle based windows CE 5.0 mobile devices that all share the same software and usage model of Direct Store Delivery during the day then doing a Tcom at the home base every night. There is an unknown event(s) that results in the device freaking out and rebooting itself in the mid...
Data analysis of log files – How to find a pattern?
0
0
0
2,344
38,887,061
2016-08-11T04:02:00.000
0
1
0
0
python,amazon-web-services,amazon-dynamodb,aws-lambda,alexa-skills-kit
38,895,935
4
false
1
0
My guess would be that you missed a step on setup. There's one where you have to set the "event source". IF you don't do that, I think you get that message. But the debug options are limited. I wrote EchoSim (the original one on GitHub) before the service simulator was written and, although it is a bit out of date, it ...
3
2
0
I'm starting with ASK development. I'm a little confused by some behavior and I would like to know how to debug errors from the "service simulator" console. How can I get more information on the The remote endpoint could not be called, or the response it returned was invalid. errors? Here's my situation: I have a skill...
Troubleshooting Amazon's Alexa Skill Kit (ASK) Lambda interaction
0
0
1
3,387
38,887,061
2016-08-11T04:02:00.000
3
1
0
0
python,amazon-web-services,amazon-dynamodb,aws-lambda,alexa-skills-kit
38,902,127
4
true
1
0
tl;dr: The remote endpoint could not be called, or the response it returned was invalid. also means there may have been a timeout waiting for the endpoint. I was able to narrow it down to a timeout. Seems like the Alexa service simulator (and the Alexa itself) is less tolerant to long responses than the lambda testin...
3
2
0
I'm starting with ASK development. I'm a little confused by some behavior and I would like to know how to debug errors from the "service simulator" console. How can I get more information on the The remote endpoint could not be called, or the response it returned was invalid. errors? Here's my situation: I have a skill...
Troubleshooting Amazon's Alexa Skill Kit (ASK) Lambda interaction
1.2
0
1
3,387
38,887,061
2016-08-11T04:02:00.000
1
1
0
0
python,amazon-web-services,amazon-dynamodb,aws-lambda,alexa-skills-kit
39,245,816
4
false
1
0
I think the problem you having for ARN:1 is you probably didn't set a trigger to alexa skill in your lambda function. Or it can be the alexa session timeout which is by default set to 8 seconds.
3
2
0
I'm starting with ASK development. I'm a little confused by some behavior and I would like to know how to debug errors from the "service simulator" console. How can I get more information on the The remote endpoint could not be called, or the response it returned was invalid. errors? Here's my situation: I have a skill...
Troubleshooting Amazon's Alexa Skill Kit (ASK) Lambda interaction
0.049958
0
1
3,387
38,890,319
2016-08-11T07:47:00.000
0
0
0
0
python,ibm-cloud-infrastructure
38,898,571
1
false
0
0
We don't have any report about this kind of issue nor if the server is busy in SoftLayer's side. but regarding to your issue, it is something related with network issues. It seems that there is something happening with your proxy connection. First we need to discard if the proxy can be the reason for this issue, it wou...
1
0
0
It is wired to get an exception at about 7:30am(utc+8) everyday when calling softlayer-api. TransportError: TransportError(0): HTTPSConnectionPool(host='api.softlayer.com', port=443): Max retries exceeded with url: /xmlrpc/v3.1/SoftLayer_Product_Package (Caused by ProxyEr ror('Cannot connect to proxy.', error('Tunnel c...
TransportError happened when calling softlayer-api
0
0
1
106
38,891,879
2016-08-11T09:04:00.000
0
0
0
0
python,django,nginx,process,uwsgi
39,093,474
2
true
1
0
I figured out a workaround (Don't know if it will qualify as an answer). I wrote the background process as a job in database and used a cronjob to check if I have any job pending and if there are any the cron will start a background process for that job and will exit. The cron will run every minute so that there is not...
1
4
0
I am starting a process using python's multiprocessing module. The process is invoked by a post request sent in a django project. When I use development server (python manage.py runserver), the post request takes no time to start the process and finishes immediately. I deployed the project on production using nginx and...
python process takes time to start in django project running on nginx and uwsgi
1.2
0
0
739
38,899,740
2016-08-11T14:51:00.000
-1
0
1
0
python,special-characters
39,754,124
1
true
0
0
CMD can not display those characters you must convert them
1
1
0
I have a python program that returns a large amount of info from an API. The info contains special characters like the TM sign and the ★ symbol. When the code is run in the IDLE interface it works exactly as it should returning all information however when the program is run in the CMD-Like interface it crashes because...
How to display special characters in the CMD part of python
1.2
0
0
186
38,901,974
2016-08-11T16:44:00.000
1
0
1
0
python,bamboo,suse,python-jira
38,902,162
2
false
1
0
That is very hard to understand what you problem is. From what I understood you are saying that when you run your module as standalone file, everything works, but when you imoprt it you get an error. Here are some steps towards solving the problem. Make sure that your script is in Python package. In order to do that, ...
2
1
0
Hi I'm running a python script that transitions tickets from "pending build" to "in test" in Jira. I've ran it on my local machine (Mac OS X) and it works perfectly but when I try to include it as a build task in my bamboo deployment, I get the error "from jira import JIRA ImportError: No module named jira" I'm callin...
ImportError: No module named jira
0.099668
0
0
7,884
38,901,974
2016-08-11T16:44:00.000
0
0
1
0
python,bamboo,suse,python-jira
48,773,686
2
false
1
0
Confirm that you don't have another file or directory that shares the same name as the module you are trying to import.
2
1
0
Hi I'm running a python script that transitions tickets from "pending build" to "in test" in Jira. I've ran it on my local machine (Mac OS X) and it works perfectly but when I try to include it as a build task in my bamboo deployment, I get the error "from jira import JIRA ImportError: No module named jira" I'm callin...
ImportError: No module named jira
0
0
0
7,884
38,903,061
2016-08-11T17:53:00.000
1
0
0
0
python,r,lda,topic-modeling,text-analysis
38,916,691
1
true
0
0
First, your question kind of assumes that topics identified by LDA correspond to real semantic topics - I'd be very careful about that assumption and take a look at the documents and words assigned to topics you want to interpret that way, as LDA often have random extra words assigned, can merge two or more actual topi...
1
1
1
As far as I know, I need to fix the number of topics for LDA modeling in Python/ R. However, say I set topic=10 while the results show that, for a document, nine topics are all about 'health' and the distinct number of topics for this document is 2 indeed. How can I spot it without examining the key words of each topic...
Find the Number of Distinct Topics After LDA in Python/ R
1.2
0
0
618
38,906,212
2016-08-11T21:09:00.000
0
0
1
0
python
38,906,316
2
false
0
0
%2 is checking the modulus of the number when divided by 2, in otherwords it's checking if the reminder is 1 or 0, while &1 is the bitwise operator checking if the last bit is the same. The bitwise operator IS slightly faster, but the difference is negligible. IMO the reason I think %2 is used more is because that make...
1
0
0
I have noticed that the most common way to determine whether a number is even in python is x%2. Wouldn't x&1 be faster? What disadvantages does it have?
Why is %2 used rather than &1 to determine parity
0
0
0
631
38,906,844
2016-08-11T22:06:00.000
0
1
1
1
python,python-2.7,bamboo
40,619,044
2
false
0
0
I run a lot of python tasks from bamboo, so it is possible. Using the Script task is generally painless... You should be able to use your script task to run the commands directly and have stdout written to the logs. Since this is true, you can run: 'which python' -- Output the path of which python that is being ran. '...
1
2
0
I'm trying to run a python script from bamboo. I created a script task and wrote inline "python myFile.py". Should I be listing the full path for python? I changed the working directory to the location of myFile.py so that is not a problem. Is there anything else I need to do within the configuration plan to properly ...
Run a python script from bamboo
0
0
0
5,082
38,921,975
2016-08-12T15:51:00.000
1
0
1
0
python,arrays,numpy,dictionary,red-black-tree
38,924,162
2
false
0
0
The most basic form of a dictionary is a structure called a HashMap. Implementing a hashmap relies on turning your key into a value that can be quickly looked up. A pathological example would be using ints as keys: The value for key 1 would go in array[1], the value for key 2 would go in array[2], the Hash Function ...
1
3
1
I need to write a huge amount number-number pairs into a NumPy array. Since a lot of these pairs have a second value of 0, I thought of making something akin to a dictionary. The problem is that I've read through the NumPy documentation on structured arrays and it seems like dictionaries built like those on the page ca...
How can I implement a dictionary with a NumPy array?
0.099668
0
0
4,918
38,925,638
2016-08-12T19:59:00.000
0
0
0
0
python,django-upgrade
38,926,190
2
false
1
0
You might have Django installed twice. Running "pip uninstall django" twice, and then reinstalling new version again should help.
2
2
0
After upgrading my django from 1.8 to 1.10, when i start a project(django-admin startproject lwc) there is an error: CommandError: C:\Python34\binesh\lwc\lwc\settings.py already exists, overlaying a project or app into an existing directory won't replace conflicting files. it creates a file for lwc, manage.py and anoth...
command error after start project in django
0
0
0
961
38,925,638
2016-08-12T19:59:00.000
1
0
0
0
python,django-upgrade
39,836,064
2
false
1
0
Uninstall django, delete your python/Lib/site-packages/django directory completely, then reinstall. The installation of the new version, even though it claims to uninstall the old version, leaves old files hanging around, and they are quietly brought into the new version in various ways (e.g., manage.py can bring in s...
2
2
0
After upgrading my django from 1.8 to 1.10, when i start a project(django-admin startproject lwc) there is an error: CommandError: C:\Python34\binesh\lwc\lwc\settings.py already exists, overlaying a project or app into an existing directory won't replace conflicting files. it creates a file for lwc, manage.py and anoth...
command error after start project in django
0.099668
0
0
961
38,926,579
2016-08-12T21:16:00.000
7
0
1
0
python,list
38,926,607
2
true
0
0
list(thing) doesn't mean "put thing in a list". It means "put thing's elements in a list". If you want to put a thing in a list, that's [thing].
1
0
0
I have a case where a user passes a function a single floating-point value. While trying to put that value into a list for easier data handling later, I've discovered that I cannot make a list using list(some_float), but [some_float] does work. Python prints an error stating that "'float' object is not iterable." My qu...
Python -- list(some_float) fails but [some_float] works?
1.2
0
0
53
38,926,917
2016-08-12T21:48:00.000
0
0
1
1
python,python-2.7
38,926,942
1
false
0
0
Basically, the only drawback is that it's potentially slower. The buffering on stdin allows your program to run ahead of the physical I/O which is slow. However, if you're sending it to less, you're operating at human speeds anyway -- it's not going to make a difference.
1
1
0
I have a script whose output is piped to less, and I would like the script to print it's statements into less as they come, rather than all at once. I found that if I flush stdout (via sys.stdout.flush()) after each print, the line is displayed in less when flushed (obviously). My question is: Are there any drawbacks t...
Implications of flushing stdout after each print
0
0
0
373
38,927,339
2016-08-12T22:38:00.000
2
0
0
0
python-3.x,gtk3,pygobject
38,931,286
1
true
0
1
Gio.Icon is just an interface. It is implemented by Gio.ThemedIcon, Gio.FileIcon, Gio.BytesIcon, etc. So you would would use those.
1
1
0
I need to show an icon on Gio.MenuItem with set_icon() method. But set_icon() expects to receive a GIcon object. How to create a GIcon object?
How to instantiate GIcon
1.2
0
0
90
38,930,971
2016-08-13T08:49:00.000
1
0
1
0
python,multithreading,queue,locking
38,932,248
1
true
0
0
The Queue type has blocking calls to get() and put() by default. So when you make a get() call, it will block the call and wait for an item to be put in the queue. The put() call will also by default block if the queue is full and wait for a slot to be free before it can put the item. This default behaviour might be ...
1
0
0
I currently have a program that starts a thread with a FIFO queue. The queue is constantly putting data into the queue, and there is a method to get the items from the queue. The method acquires a lock and releases it once it grabs the items. My question is, will I face into any problems in the future putting and gett...
Can you get and put into a Queue at the same time?
1.2
0
0
937
38,931,064
2016-08-13T09:00:00.000
0
0
0
1
python,sockets,batch-file,portforwarding
38,932,875
2
false
0
0
I'm not sure if that's possible, as much as I know, ports aren't actually a thing their just some abstraction convention made by protocols today and supported by your operating system that allows you to have multiple connections per one machine, now sockets are basically some object provided to you by the operating sys...
2
3
0
Purpose: I'm making a program that will set up a dedicated server (software made by game devs) for a game with minimal effort. One common step in making the server functional is port forwarding by making a port forward rule on a router. Me and my friends have been port forwarding through conventional means for many yea...
How to make a port forward rule in Python 3 in windows?
0
0
1
707
38,931,064
2016-08-13T09:00:00.000
0
0
0
1
python,sockets,batch-file,portforwarding
38,932,807
2
false
0
0
You should read first some sort of informations about UPnP (Router Port-Forwarding) and that it's normally disabled. Dependent of your needs, you could also try a look at ssh reverse tunnels and at ssh at all, as it can solve many problems. But you will see that working with windows and things like adavanced network ...
2
3
0
Purpose: I'm making a program that will set up a dedicated server (software made by game devs) for a game with minimal effort. One common step in making the server functional is port forwarding by making a port forward rule on a router. Me and my friends have been port forwarding through conventional means for many yea...
How to make a port forward rule in Python 3 in windows?
0
0
1
707
38,933,872
2016-08-13T14:47:00.000
3
0
1
0
python,algorithm,dynamic-programming
38,934,300
1
true
0
0
Lets say cost[i] - best cost to cover first i elements of the roof. Obviously cost[0] = 0 (we don't need any money to cover 0 tiles). Lets describe our state as (position, cost). From state (i,cost[i]) we can get to 4 different potential states: (i + 1, cost[i] + 3) (when we use tile of length 1 and cost is 3) (i + 13...
1
1
0
I'm just learning about dynamic programming, and I've stumbled upon a problem which I am not sure how to formulate in Python: Given a binary array H of length 55, a 1 indicates a hole in the roof, 0 indicates no hole. The tails you can use have length 1, 13 or 55, and the cost to deploy each is 3, 13 and 50, respect...
How to find the minimum number of tiles needed to cover holes in a roof
1.2
0
0
389
38,936,584
2016-08-13T20:12:00.000
1
0
0
0
python,python-3.x,python-module
38,937,103
1
false
0
0
My flow chart looks something like this: Reading the published documentation (or use help(moduleName) which gives you the same information without an internet connection in a harder to read format). This can be overly verbose if you're only looking for one tidbit of information, in which case I move on to... Finding t...
1
1
0
I can't seem to find a good explanation of how to use Python modules. Take for example the urllib module. It has commands such as req = urllib.request.Request(). How would I find out what specific commands, like this one, are in certain Python modules? For all the examples I've seen of people using specific Python modu...
How to find good documentation for Python modules
0.197375
0
1
138
38,938,191
2016-08-14T00:39:00.000
1
0
0
0
php,python,django
38,941,344
1
true
1
0
Django used to do the same back when CGI was the most common way to run dynamic web applications. It would create a new python process on each request, which would load all the files on the fly. But while PHP is optimized for this use-case with a fast startup time, Python, as a general purpose language, isn't, and ther...
1
2
0
I'm confused about this question. When do Django development, if I have modified the py file or static file, the build-in server will reload. But on PHP app development, if I have modified the files, the Apache Server do not need reload and the modified content will show on browser. Why?
Why WSGI Server need reload Python file when modified but PHP not need?
1.2
0
0
291
38,938,205
2016-08-14T00:42:00.000
0
0
1
0
python,python-3.x,pip
38,943,188
7
false
0
0
Since you have specified in the comments you want syntax like pip install [package] to work, here is a solution: Install setuptools for Python3: apt-get install python3-setuptools Now pip for Python3 could be installed by: python3 -m easy_install pip Now you can use pip with the specific version of Python to install ...
2
56
0
I am using OSX and I have pip installed for both Python3.5 and Python2.7. I know I can run the command pip2 to use Python2 and when I use the command pip3 Python3.x will be used. The problem is that the default of pip is set to Python2.7 and I want it to be Python3.x. How can I change that? edit: No, I am not running...
How to override the pip command to Python3.x instead of Python2.7?
0
0
0
94,207
38,938,205
2016-08-14T00:42:00.000
10
0
1
0
python,python-3.x,pip
38,938,367
7
false
0
0
Can't you alias pip='pip3' in your ~/.bash_profile? In Terminal, run nano ~/.bash_profile, then add a line to the end that reads alias pip='pip3'. This is safe; it won't affect system processes, only your terminal.
2
56
0
I am using OSX and I have pip installed for both Python3.5 and Python2.7. I know I can run the command pip2 to use Python2 and when I use the command pip3 Python3.x will be used. The problem is that the default of pip is set to Python2.7 and I want it to be Python3.x. How can I change that? edit: No, I am not running...
How to override the pip command to Python3.x instead of Python2.7?
1
0
0
94,207
38,939,085
2016-08-14T04:19:00.000
0
0
0
1
python,command-line,spotify,spotipy
39,049,945
1
false
0
0
Copy and paste the entire redirect URI from your browser to the terminal (when prompted) after successful authentication. Your access token will be cached in the directory (look for .cache.<username>)
1
0
0
I am testing my app using the terminal, which is quite handy in a pre-development phase. so far, I have used spotipy.Spotify(client_credentials_manager=client_credentials_manager) within my python scripts in order to access data. SpotifyClientCredentials() requires client_idand client_secret as parameters. now I need ...
Spotify - access token from command line
0
0
1
422
38,944,172
2016-08-14T16:23:00.000
0
1
1
0
python,c++,subprocess,piping
38,959,725
3
false
0
0
I'm not familiar with python however, a simple approach is to use some communication protocols such as serial ports or udp which is a network protocol. For real-time applications, UDP protocol is a preferable choice.
1
3
0
I have a sensor value which can be read using the C++ only because it was implemented using it , I want to pass location value (two float variable) of one sensor to Python. I have been reading a lot and I found shared memory , piping and more any idea what is the best way to do it ?
How to pass variable value from C++ to Python?
0
0
0
3,054
38,944,204
2016-08-14T16:27:00.000
5
0
1
0
ipython,jupyter,jupyter-notebook
38,944,682
1
false
1
0
Reposting as an answer: When your changes don't seem to be taking effect in an HTML interface, browser caching is often a culprit. The browser saves time by not asking for files again. You can: Try force-refreshing with Ctrl-F5. It may get some things from the cache anyway, though sometimes mashing it several times is...
1
2
0
By mistake, I updated this file to customize css. D:\Continuum\Anaconda2\Lib\site-packages\notebook\static\custom\custom.css To rollback the above change, 1) I put back the original file that I saved before. still the new css shows up in jupyter. 2) I removed all .ipython and .jupyter dir and it didn't work either. 3)...
jupyter custom.css removal
0.761594
0
0
770
38,944,551
2016-08-14T17:06:00.000
4
0
0
0
python,django,apache,postgresql,github
62,814,973
4
false
1
0
If you receive this error and are using the Heroku hosting platform its quite possible that you are trying to write to a Hobby level database which has a limited number of rows. Heroku will allow you to pg:push the database even if you exceed the limits, but it will be read-only so any modifications to content won't be...
1
53
0
What are some basic steps for troubleshooting and narrowing down the cause for the "django.db.utils.ProgrammingError: permission denied for relation django_migrations" error from Django? I'm getting this message after what was initially a stable production server but has since had some changes to several aspects of Dja...
Steps to Troubleshoot "django.db.utils.ProgrammingError: permission denied for relation django_migrations"
0.197375
1
0
32,047
38,945,299
2016-08-14T18:26:00.000
0
1
0
1
python,shell,jboss,nagios,icinga
39,367,798
3
true
1
0
I did this by monitored jboss process using ps aux | grep "\-D\[Standalone\]" for standalone mode and ps aux | grep "\-D\[Server" for domain mode.
1
0
0
I want to monitor jboss if its running or not through Icinga. I don't want to check /etc/inid.d/jboss status as sometimes service is up but some of the jboss is killed or hang & jboss doesn't work properly. I would like to create a script to monitor all of its process from ps output. But few servers are running in stan...
monitoring jboss process with icinga/nagios
1.2
0
0
1,024
38,945,695
2016-08-14T19:11:00.000
0
0
0
0
python,opencv,ellipse,data-fitting
38,945,813
2
false
0
0
Empirically, I ran code matching thousands of ellipses, and I never got one return value where the returned width was greater than the returned height. So it seems OpenCV normalizes the ellipse such that height >= width.
1
1
1
An ellipse of width 50, height 100, and angle 0, would be identical to an ellipse of width 100, height 50, and angle 90 - i.e. one is the rotation of the other. How does cv2.fitEllipse handle this? Does it return ellipses in some normalized form (i.e. angle is picked such that width is always < height), or can it provi...
How does cv2.fitEllipse handle width/height with regards to rotation?
0
0
0
1,827
38,948,021
2016-08-15T00:57:00.000
0
0
0
1
python,linux,bash,ubuntu,windows-subsystem-for-linux
39,723,038
3
false
0
0
Looks like you are having permissions issues. To see everything on your home folder try ls -al to change permissions check out the chmod command
2
0
0
I'm new to Linux. I recently downloaded Bash on Ubuntu on Windows 10 (after the Anniversary edition update to Windows 10). Since this update is relatively new, there is not much online regarding troubleshooting. There are two things I need help on: (1) When I go to the home folder, which seems to be "C:\Users\user\AppD...
bash on Ubuntu on windows Linux, folder recognition, and running Python scripts
0
0
0
970
38,948,021
2016-08-15T00:57:00.000
1
0
0
1
python,linux,bash,ubuntu,windows-subsystem-for-linux
51,154,550
3
false
0
0
The reason why ls is not showing anything is that it shows the Linux directory structure. Try setting it to the Windows directory, in this example the c drive: cd /mnt/c Does ls show a folder structure now?
2
0
0
I'm new to Linux. I recently downloaded Bash on Ubuntu on Windows 10 (after the Anniversary edition update to Windows 10). Since this update is relatively new, there is not much online regarding troubleshooting. There are two things I need help on: (1) When I go to the home folder, which seems to be "C:\Users\user\AppD...
bash on Ubuntu on windows Linux, folder recognition, and running Python scripts
0.066568
0
0
970
38,948,430
2016-08-15T02:12:00.000
1
0
1
0
python,bit-shift
38,948,543
1
false
0
0
Python does not have registers and you cannot declare the type of anything. The shift operators operate on unlimited-precision integers. If you shift left, the number will continue to get larger indefinitely (or until out of memory). If you shift right, the least-significant bit is dropped as you would expect. There i...
1
0
0
Let's say I want to write a 16bit linear feedback shift register LFSR in Python using its native shift operator. Does the operator itself have a feature to specify the bit to shifted into the new MSB position? Does the operator have a carry flag or the like to catch the LSB falling out of the register? Has to setup t...
Using shift operator for LFSR in python
0.197375
0
0
384
38,953,175
2016-08-15T10:11:00.000
0
0
0
1
python,dbus,bluez,gatt
38,997,649
2
false
0
0
See 'test/example-gatt-client' from bluez package
1
3
0
I would like to connect to a Bluetooth LE device and receive notifications from it in python. I would like to use the Bluez dbus API, but can't find an example I can understand. :-) With gatttool, I can use the following command: gatttool -b C4:8D:EE:C8:D2:D8 --char-write-req -a 0x001d -n 0100 –listen How can I do the ...
Connect to a Bluetooth LE device using bluez python dbus interface
0
0
0
3,227
38,954,505
2016-08-15T11:48:00.000
0
0
0
0
python,django,caching,static,cdn
38,956,967
2
true
1
0
Here's my work around : On deployment (from a bash script), I get the shasum of my css style. I put this variable inside the environment. I have a context processor for the template engine that will read from the environment.
1
1
0
I'm working on a website built with Django. When I'm doing updates on the static files, the users have to hard refresh the website to get the latest version. I'm using a CDN server to deliver my static files so using the built-in static storage from Django. I don't know about the best practices but my idea is to genera...
Cache busting with Django
1.2
0
0
865
38,955,954
2016-08-15T13:25:00.000
0
0
1
0
python,python-2.7
38,956,381
4
false
0
0
Simple answer: you can't. Except in the trivial way, which is by calling a function that does this for you, using a loop. If you want this kind of nice syntax you can use libraries as suggested: map, numpy, etc. Or you can write your own function. If what you are looking for is syntactic convenience, Python does not a...
1
0
0
I have two python lists A and B of equal length each containing only boolean values. Is it possible to get a third list C where C[i] = A[i] and B[i] for 0 <= i < len(A) without using loop? I tried following C = A and B but probably it gives the list B I also tried C = A or B which gives first list I know it can easily...
Elementwise and in python list
0
0
0
951
38,956,660
2016-08-15T14:07:00.000
24
0
0
0
python,pandas,pycharm
52,064,081
10
false
0
0
I have faced the same problem with PyCharm 2018.2.2. The reason was having a special character in a column's name as mentioned by Yunzhao . If your having a column name like 'R&D' changing it to 'RnD' will fix the problem. It's really strange JetBrains hasn't solved this problem for over 2 years.
6
57
1
I am using PyCharm 2016.2.1 . When I try to view a Pandas dataframe through the newly added feature 'View as DataFrame' in the debugger, this works as expected for a small (e.g. 4x4) DataFrame. However when I try to view a DataFrame (generated by custom script) of ~10,000 rows x ~50 columns, I get the message: "Nothin...
Dataframe not showing in Pycharm
1
0
0
27,005
38,956,660
2016-08-15T14:07:00.000
9
0
0
0
python,pandas,pycharm
51,483,568
10
false
0
0
I have met the same problems. I figured it was because of the special characters in column names (in my case) In my case, I have "%" in the column name, then it doesn't show the data in View as DataFrame function. After I remove it, everything was correctly shown. Please double check if you also have some special char...
6
57
1
I am using PyCharm 2016.2.1 . When I try to view a Pandas dataframe through the newly added feature 'View as DataFrame' in the debugger, this works as expected for a small (e.g. 4x4) DataFrame. However when I try to view a DataFrame (generated by custom script) of ~10,000 rows x ~50 columns, I get the message: "Nothin...
Dataframe not showing in Pycharm
1
0
0
27,005
38,956,660
2016-08-15T14:07:00.000
2
0
0
0
python,pandas,pycharm
57,003,355
10
false
0
0
In my situation, the problem is caused by two same cloumn name in my dataframe. Check it by:df.columns.shape[0] == len(set(df.columns))
6
57
1
I am using PyCharm 2016.2.1 . When I try to view a Pandas dataframe through the newly added feature 'View as DataFrame' in the debugger, this works as expected for a small (e.g. 4x4) DataFrame. However when I try to view a DataFrame (generated by custom script) of ~10,000 rows x ~50 columns, I get the message: "Nothin...
Dataframe not showing in Pycharm
0.039979
0
0
27,005
38,956,660
2016-08-15T14:07:00.000
2
0
0
0
python,pandas,pycharm
55,593,342
10
false
0
0
I use PyCharm 2019.1.1 (Community Edition) and I run Python 3.7. When I first click on "View as DataFrame" there seems to be the same issue, but if I wait a few second the content pops up. For me it is a matter of loading.
6
57
1
I am using PyCharm 2016.2.1 . When I try to view a Pandas dataframe through the newly added feature 'View as DataFrame' in the debugger, this works as expected for a small (e.g. 4x4) DataFrame. However when I try to view a DataFrame (generated by custom script) of ~10,000 rows x ~50 columns, I get the message: "Nothin...
Dataframe not showing in Pycharm
0.039979
0
0
27,005
38,956,660
2016-08-15T14:07:00.000
2
0
0
0
python,pandas,pycharm
57,313,249
10
false
0
0
For the sake of completeness: I face the same problem, due to the fact that some elements in the index of the dataframe contain a question mark '?'. One should avoid that too, if you still want to use the data viewer. Data viewer still worked, if the index strings contain hashes or less-than/greather-than signs though.
6
57
1
I am using PyCharm 2016.2.1 . When I try to view a Pandas dataframe through the newly added feature 'View as DataFrame' in the debugger, this works as expected for a small (e.g. 4x4) DataFrame. However when I try to view a DataFrame (generated by custom script) of ~10,000 rows x ~50 columns, I get the message: "Nothin...
Dataframe not showing in Pycharm
0.039979
0
0
27,005
38,956,660
2016-08-15T14:07:00.000
1
0
0
0
python,pandas,pycharm
64,172,890
10
false
0
0
As of 2020-10-02, using PyCharm 2020.1.4, I found that this issue also occurs if the DataFrame contains a column containing a tuple.
6
57
1
I am using PyCharm 2016.2.1 . When I try to view a Pandas dataframe through the newly added feature 'View as DataFrame' in the debugger, this works as expected for a small (e.g. 4x4) DataFrame. However when I try to view a DataFrame (generated by custom script) of ~10,000 rows x ~50 columns, I get the message: "Nothin...
Dataframe not showing in Pycharm
0.019997
0
0
27,005
38,960,221
2016-08-15T17:49:00.000
1
0
1
0
python,pandas,tuples
38,966,174
1
true
0
0
You could use a dict of dicts instead of a dict of namedtuples. Dicts are mutable, so you'll be able to modify the inner dicts. Given what you said in the comments about the structures of each DataFrame-1 and -2 being comparable, you could also group all of each into one big DataFrame, by adding a column to each DataF...
1
1
1
Is there a data class or type in Python that matches these criteria? I am trying to build an object that looks something like this: ExperimentData ID 1 sample_info_1: character string sample_info_2: character string Dataframe_1: pandas data frame Dataframe_2: pandas data frame ID 2 (etc.) Right now, I am usin...
Mutable indexed heterogeneous data structure?
1.2
0
0
68
38,961,360
2016-08-15T19:05:00.000
2
0
0
0
python,excel,openpyxl
39,077,066
2
false
0
0
In openpyxl you'll have to go cell by cell. You could use Excel's builtin Data Validation or Conditional Formatting, which openpyxl supports, for this. Let Excel do the work and talk to it using xlwings.
2
1
0
I am working on a project that requires me to read a spreadsheet provided by the user and I need to build a system to check that the contents of the spreadsheet are valid. Specifically I want to validate that each column contains a specific datatype. I know that this could be done by iterating over every cell in the sp...
Use openpyxl to verify the structure of a spreadsheet
0.197375
1
0
109
38,961,360
2016-08-15T19:05:00.000
1
0
0
0
python,excel,openpyxl
39,088,757
2
true
0
0
I ended up just manually looking at each cell. I have to read them all into my data structures before I can process anything anyways so it actually made sense to check then.
2
1
0
I am working on a project that requires me to read a spreadsheet provided by the user and I need to build a system to check that the contents of the spreadsheet are valid. Specifically I want to validate that each column contains a specific datatype. I know that this could be done by iterating over every cell in the sp...
Use openpyxl to verify the structure of a spreadsheet
1.2
1
0
109
38,962,468
2016-08-15T20:22:00.000
1
0
0
0
python,volttron
38,963,891
1
false
0
0
BACnet has a size limit for the size of a message. The message size has several different valid values based on the BACnet specification. If a device wants to send a message that exceeds the supported size of either device it may segment the message into smaller pieces. Both devices must support segmentation for this t...
1
1
0
When running the BACnet Proxy and MasterDriver agents, I receive the following error message: master_driver.driver ERROR: Failed to scrape Device Name: RuntimeError('Device communication aborted: segmentationNotSupported') Could anyone help me to resolve this error?
VOLTTRON : Device communication aborted: segmentationNotSupported
0.197375
0
0
78
38,962,947
2016-08-15T20:57:00.000
28
0
1
0
python,windows,ubuntu,pip
38,963,343
3
false
0
0
I highly recommend against doing this - the overwhelmingly supported best practice is to use a requirements.txt file, listing the packages you want to install specifically. You then install it with pip install -r requirements.txt and it installs all the packages for your project. This has several benefits: Repeatabili...
1
8
0
I would like to install all available modules for Python 2.7.12 using a single pip command. Is there a way to do this without having to specify every single package name?
Is there a way to install all python modules at once using pip?
1
0
0
45,827
38,963,102
2016-08-15T21:08:00.000
3
0
1
0
python,pandas,grep
38,963,174
1
true
0
0
Since grep is a compiled C program grep is certainly faster than interpreting bytecode for file scan AND regex processing (although regex lib is native code) Running with pypy could close the gap, but in the end the compiled code would win. Of course, on smaller data, if data could be stored in a dictionary, multiple s...
1
1
0
I need to search for a particular regex in a very large file I can't load to memory or create dataframe of. Which one, grep or iterating over a TextFileReader will be faster in that case? Sadly, I don't have time to learn, configure and run a Hadoop. Cheers
What will be faster - grep or pandas TextFileReader for a very large file?
1.2
0
0
214
38,964,041
2016-08-15T22:35:00.000
0
0
0
0
python,amazon-web-services,amazon-s3,amazon-ec2,keras
45,422,652
2
false
0
0
you can do it using Jupyter notebook otherwise use: Duck for MAC, Putty for windows. I hope it helps
1
2
1
I'm trying to train a Keras model on AWS GPU. How would you load images (training data) in S3 for a deep learning model with EC2 instance (GPU)?
How to load images in S3 for a deep learning model with EC2 instance (GPU)
0
0
0
764
38,965,457
2016-08-16T01:42:00.000
0
0
1
0
python,tcl,version
38,965,465
1
false
0
1
What worked eventually: tcl = Tkinter.tcl() tcl.eval('package forget Tcl') tcl.eval('package provide Tcl 8.5') tcl.eval('package require Tcl') 8.5 Success!
1
0
0
Using python2.7 Tkinter for executing Tcl. The Tcl code has package require Tcl 8.5, while the tclsh loads Tcl 8.4 by default. Causes: version conflict for package "Tcl": have 8.4, need 8.5 I have libtcl8.5.so installed at a custom location. Tried adding it to LD_LIBRARY_PATH, TCL_LIBRARY, TCLLIBPATH. Nothing worked. I...
Python Tkinter: version conflict for package "Tcl": have 8.4, need 8.5
0
0
0
761
38,966,114
2016-08-16T03:16:00.000
0
0
1
1
python,django,intellij-idea,ide,pycharm
53,610,811
2
false
0
0
Go to File > Settings > Plugins > Browse repositories > Search and Install Native Terminal This will install a terminal which will use the Windows Native terminal. A small black button will appear on the tool bar. If you did not enable the tool bar, here is the trick: View | toolbar check this toolbar option and the cm...
2
1
0
First time posting, let me know how I can improve my questions. I have installed PyCharm Edu 3.0 and Anaconda 3 on an older laptop. I am attempting to access the embedded terminal in the IDE and I am unable to launch it. I have searched through similar questions here and the JetBrains docs, and the common knowledge see...
Pycharm edu terminal plugin missing
0
0
0
628
38,966,114
2016-08-16T03:16:00.000
-1
0
1
1
python,django,intellij-idea,ide,pycharm
43,782,480
2
false
0
0
Click preferences and choose plugin. Next click install Jetbrains plugin and choose Command line Tool Support. I hope this will help you
2
1
0
First time posting, let me know how I can improve my questions. I have installed PyCharm Edu 3.0 and Anaconda 3 on an older laptop. I am attempting to access the embedded terminal in the IDE and I am unable to launch it. I have searched through similar questions here and the JetBrains docs, and the common knowledge see...
Pycharm edu terminal plugin missing
-0.099668
0
0
628
38,966,528
2016-08-16T04:09:00.000
0
0
1
0
python-3.x,process,multiprocessing,parent-child,atexit
38,981,627
1
false
0
0
The functions registered via atexit are inherited by the children processes. The simplest way to prevent that, is via calling atexit after you have spawned the children processes.
1
0
0
I have a program that spawns multiple child processes, how would I make the program only call atexit.register(function) on the main process and not on the child processes as well? Thanks
Python3 Running atexit only on the main process
0
0
0
168
38,968,007
2016-08-16T06:30:00.000
1
1
0
0
java,python,c++,python-2.7,batch-file
38,968,156
2
false
0
1
You can load C++ function and execute it from Python like BasicWolf explained in his answer. For Java, Jython might be a good approach. But then there's a problem - you will need to be dependent on Jython which is not up to date with the latest versions of Python. You will face compatibility issues with different libra...
1
2
0
I am creating a Windows program that so far has a .bat file calling a .pyw file, and I need functions from Java and C++. How can I do this?(I don't mind creating a new batch or python file, and I already have the header file for the C++ section and a .jar file for my java components. (For Java I use Eclipse Java Mars, ...
How do you call C++ and\or Java functions from Python 2.7?
0.099668
0
0
455
38,968,367
2016-08-16T06:54:00.000
5
0
1
0
python,apache-spark,ibm-cloud,data-science-experience,watson-studio
38,968,368
1
true
0
0
!PIP_USER= pip freeze IBM sets the environment variable PIP_USER to enable the --user option by default. That's because many users forgot to specify that option for pip install. Unfortunately, this also enables the option for pip freeze, where it might not be desired. Therefore, you have to override the default option ...
1
1
0
Update August 2019: This question is no longer relevant. It refers to a retired Apache Spark as a Service offering. Current Spark backends in Watson Studio use a different technology. In a Python notebook, I can execute !pip freeze to get a list of installed packages. But the result is an empty list, or shows only a fe...
How to list the pre-installed Python packages on IBM's Spark service
1.2
0
0
467
38,969,449
2016-08-16T07:57:00.000
0
0
1
0
python,ibm-cloud-infrastructure
38,977,645
1
false
0
0
Currently there’s no API method to reset the Virtual Guest’s password.
1
0
0
I have a requirement that resetting the virtual guest's password when the password is forgotten. And I failed to find a suitable method to reset the password. Maybe reloading the os is a way to reset the password, but it is too crude. Is there any api/method to reset the virtual guest's password?
Can not find api to reset virtual guest's password
0
0
0
35
38,972,380
2016-08-16T10:22:00.000
0
0
0
0
python,deep-learning,keras
39,922,584
3
false
0
0
The best way to achieve this seems to be to create a new generator class expanding the one provided by Keras that parses the data augmenting only the images and yielding all the outputs.
1
22
1
In a Keras model with the Functional API I need to call fit_generator to train on augmented images data using an ImageDataGenerator. The problem is my model has two outputs: the mask I'm trying to predict and a binary value. I obviously only want to augment the input and the mask output and not the binary value. How ca...
Keras: How to use fit_generator with multiple outputs of different type
0
0
0
21,904
38,972,634
2016-08-16T10:34:00.000
0
0
1
0
python-3.x,window,python-idle
38,996,457
1
false
0
0
folder location for idle settings (windows) is: users\PCname.idlerc. thanks @TerryJanReedy
1
0
0
this is annoying. even when i change it from the option to a different height and width. every time I open the script window or the idle. it's at max height. I also the disabled the height option and still the same. I uninstalled and reinstalled. but the same also. is there a place where the python settings are saved a...
python 3 idle window stuck at full height
0
0
0
86
38,976,431
2016-08-16T13:35:00.000
0
0
0
0
python,pandas,numpy,large-data
38,976,616
1
false
0
0
Out of curiosity, is there a reason you want to use Pandas for this? Image analysis is typically handled in matrices making NumPy a clear favorite. If I'm not mistaken, both sk-learn and PIL/IMAGE use NumPy arrays to do their analysis and operations. Another option: avoid the in-memory step! Do you need to access a...
1
1
1
Background: I have a sequence of images. In each image, I map a single pixel to a number. Then I want to create a pandas dataframe where each pixel is in its own column and images are rows. The reason I want to do that is so that I can use things like forward fill. Challenge: I have transformed each image into a one di...
Initializing a very large pandas dataframe
0
0
0
310
38,978,228
2016-08-16T14:57:00.000
0
0
1
1
python,git,docker,docker-compose,devops
38,978,850
1
false
0
0
The best solution is B except you will not use a volume in production. Docker-compose will also allow you to easily mount your code as a volume but you only need this for dev. In production you will COPY your files into the container.
1
0
0
I want to Dockerize a project. I have my project files in a git repo. The project is written in python, and requires a virtual environment to be activated and a pip installation of requirements after the git clone from the repo. The container is going to be a development container, so I would need a basic set of softwa...
Should I create a volume for project files when using Docker with git?
0
0
0
86
38,979,170
2016-08-16T15:42:00.000
0
1
0
0
javascript,jquery,python,cookies
38,979,448
1
false
1
0
IF you want to interact to anorher webservice the resolution is send post/get request and parse response Question is what is your goal?
1
0
0
I have a problem that I am trying to conceptualize whether possible or not. Nothing too fancy (i.e. remote login or anything etc.) I have Website A and Website B. On website A a user selects on a few links from website B, i would like to then remotely click on behalf of the user on the link (as Website B creates a coo...
How to remote click on links from a 3rd party website
0
0
1
38
38,980,544
2016-08-16T16:57:00.000
0
0
0
0
python,machine-learning,scikit-learn,random-forest
38,980,686
1
true
0
0
They will be treated in the same manner as the minimal value already encountered in the training set. RF is just a bunch of voting decision trees, and (basic) DTs can only form decisions in form of "if feature X is > then T go left, otherwise go right". Consequently, if you fit it to data which, for a given feature, ha...
1
0
1
When I built my random forest model using scikit learn in python, I set a condition (where clause in sql query) so that the training data only contain values whose value is greater than 0. I am curious to know how random forest handles test data whose value is less than 0, which the random forest model has never seen b...
What does Random Forest do with unseen data?
1.2
0
0
709
38,983,478
2016-08-16T20:01:00.000
1
0
1
0
python-3.x,server,simplehttpserver,python-interactive
38,983,578
1
true
0
0
You could add a (testing only!) route in your web server, like POST /eval, which takes a string which will be Python code, executes it, and returns the result. Obviously you need to make sure such functionality isn't exposed to a public network.
1
0
0
I'm not sure if this is the right way to word this, but I have a python web server that accepts connections and updates objects, is it possible to use the interactive shell to inject commands into the same memory space and view/change the objects the server is interacting with? Currently, once the httpd function starts...
Run Python process in background with interactive shell on the same memory
1.2
0
0
153
38,984,069
2016-08-16T20:39:00.000
3
0
0
0
python,machine-learning,scikit-learn
38,984,364
1
true
0
0
You cannot add data to SVM and achieve the same result as if you would add it to the original training set. You can either retrain with extended training set starting with the previous solution (should be faster) or train on new data only and completely diverge from the previous solution. There are only few models that...
1
2
1
I am scraping approximately 200,000 websites, looking for certain types of media posted on the websites of small businesses. I have a pickled linearSVC, which I've trained to predict the probability that a link found on a web page contains media of the type that I'm looking for, and it performs rather well (overall acc...
add training data to existing LinearSVC
1.2
0
0
902
38,984,387
2016-08-16T20:59:00.000
1
0
1
0
python,nltk
40,272,424
3
false
0
0
While i am not sure exactly where the problem arises, I had this same error happen to me (it started 'overnight' - the code had been working, i hand not re-installed nltk, so i have no idea what caused it to start happening). I still had the problem after upgrading to the latest version of nltk (3.2.1), and re-download...
1
4
0
I am trying to use nltk in python, but am receiving a pop up error (windows) describing that I am missing a drive at the moment I call import nltk Does anyone know why or how to fix this? The error is below: "There is no disk in the drive. Please insert a disk into drive \Device\Harddisk4\DR4."
Drive issue with python NLTK
0.066568
0
0
895
38,985,796
2016-08-16T23:08:00.000
0
0
1
0
python,class,instance
38,985,920
1
false
0
0
If you are running the files on after another with the interpreter, then the counter will reset once you run the second file, since everything from the first file being run will have exited memory. If you need data to persist between running two different files, your best bet is to write it to an external file in the f...
1
0
0
So I have a python class Driver which has a method drive which essentially runs a loop forever. I have it set up so that with every new instance of the class, a counter goes up. So if I make two separate instances of the class in 2 different files and run them one after the other, will the one that runs second register...
How to register class instance count in two separate files?
0
0
0
40
38,987,289
2016-08-17T02:41:00.000
0
0
0
1
python,macos,pygame,osx-elcapitan
42,425,154
2
false
0
0
Okie Dokie I figured it out. You have to download the version of idle that is 2.7.(any) IMPORTANT!!! the version has to be 32 bit not 64 bit. Just search on the idle website idle 2.7.12 32 bit. Then download that. Finally download pygame 2.7. Thanks everyone that helped out! P.S. Some idle versions didn't work for me. ...
2
0
0
I started programing a game on a Mac. Then, I brought the same EXACT code to another Mac. I got many, many different errors with Pygame saying it wasn't installed, EVEN THOUGH IT WAS! Anyway, I fixed those errors, then I went to go run the module and the window appeared then it crashed and gave me this message: IDL...
IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection
0
0
0
5,220
38,987,289
2016-08-17T02:41:00.000
0
0
0
1
python,macos,pygame,osx-elcapitan
39,058,369
2
false
0
0
The most likely reason that your getting this error, is because you're not the administrator of the computer and you're trying to run a script from your local disk. There are a few things that you could do to solve this. 1. Move the .py file: Before jumping to the method below, simply try moving your python file to a d...
2
0
0
I started programing a game on a Mac. Then, I brought the same EXACT code to another Mac. I got many, many different errors with Pygame saying it wasn't installed, EVEN THOUGH IT WAS! Anyway, I fixed those errors, then I went to go run the module and the window appeared then it crashed and gave me this message: IDL...
IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection
0
0
0
5,220
38,987,464
2016-08-17T03:05:00.000
1
0
0
0
python,algorithm,graph,analytics,d3dimage
38,987,964
2
false
0
0
One approach would be to choose a threshold density, convert all voxels below this threshold to 0 and all above it to 1, and then look for the pair of 1-voxels whose shortest path is longest among all pairs of 1-voxels. These two voxels should be near the ends of the longest "rope", regardless of the exact shape that ...
1
2
1
I have protein 3D creo-EM scan, such that it contains a chain which bends and twists around itself - and has in 3-dimension space 2 chain endings (like continuous rope). I need to detect (x,y,z) location within given cube space of two or possibly multiplier of 2 endings. Cube space of scan is presented by densities in ...
How to detect ending location (x,y,z) of certain sequence in 3D domain
0.099668
0
0
97
38,989,896
2016-08-17T06:49:00.000
0
0
1
0
python,windows,scikit-learn
46,249,521
2
false
0
0
Old post, but right answer is, 'sudo pip install -U numpy matplotlib --upgrade' for python2 or 'sudo pip3 install -U numpy matplotlib --upgrade' for python3
2
1
1
I know how to install external modules using the pip command but for Scikit-learn I need to install NumPy and Matplotlib as well. How can I install these modules using the pip command?
How to install scikit-learn
0
0
0
2,435
38,989,896
2016-08-17T06:49:00.000
-1
0
1
0
python,windows,scikit-learn
38,990,089
2
false
0
0
Using Python 3.4, I run the following from the command line: c:\python34\python.exe -m pip install package_name So you would substitute "numpy" and "matplotlib" for 'package_name'
2
1
1
I know how to install external modules using the pip command but for Scikit-learn I need to install NumPy and Matplotlib as well. How can I install these modules using the pip command?
How to install scikit-learn
-0.099668
0
0
2,435
38,990,070
2016-08-17T07:00:00.000
0
0
1
0
python-2.7
38,990,213
2
false
0
0
files have a writelines method. use that instead of write
1
0
0
I tried it but it comes in the form of a list in the file. I want it in a format without the brackets and the commas.
How to convert a list in Python to a text file?
0
0
0
961