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,203,988
2016-07-05T12:52:00.000
1
0
0
0
python,pandas,encoding,sas
44,310,145
3
false
0
0
read_sas from pandas seem to not like encoding = "utf-8". I had a similar problem. Using SAS7BDAT('foo.sas7bdata').to_data_frame() solved the decoding issues of sas files for me.
1
2
1
I am trying to import a sas dataset(.sas7bdat format) using pandas function read_sas(version 0.17) but it is giving me the following error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 12: ordinal not in range(128)
Encoding in .sas7dbat
0.066568
0
0
9,854
38,204,346
2016-07-05T13:10:00.000
1
0
0
0
python,excel,csv
38,206,084
2
false
0
0
If you want to do somewhat more selective fishing for particular rows, then the python csv module will allow you to read the csv file row by row into Python data structures. Consult the documentation. This may be useful if just grabbing the first hundred lines reveals nothing about many of the columns because they are ...
1
2
1
I have a ~1.0gb CSV file, and when trying to load it into Excel just to view, Excel crashes. I don't know the schema of the file, so it's difficult for me to load it into R or Python. The file contains restaurant reviews and has commas in it. How can I open just a portion of the file (say, the first 100 rows, or 1.0mb'...
Viewing a portion of a very large CSV file?
0.099668
0
0
1,514
38,205,364
2016-07-05T13:56:00.000
1
0
1
0
python,performance,select,time,sleep
38,205,678
3
false
0
0
How you defining the efficiency? In most of the cases, the sleep and select have been using to observe if there space/buffer. If the space is not available, then we have option to wait and see when the buffer will be empty and we can execute our action. The sleep() internally select(). So, I think it matters with which...
2
6
0
What would be better ? time.sleep(delayTime) or select.select([],[],[],delayTime) Are they equivalent ? Is select more efficient?
What's the most efficient way to sleep in Python?
0.066568
0
0
6,573
38,205,364
2016-07-05T13:56:00.000
4
0
1
0
python,performance,select,time,sleep
38,205,795
3
true
0
0
The answer depends on what your trying to achieve: time.sleep(delayTime) Action: Suspend execution of the current thread for the given number of seconds. Any caught signal will terminate the sleep() following execution of that signal’s catching routine select.select([],[],[],delayTime) This is a straightforward inter...
2
6
0
What would be better ? time.sleep(delayTime) or select.select([],[],[],delayTime) Are they equivalent ? Is select more efficient?
What's the most efficient way to sleep in Python?
1.2
0
0
6,573
38,206,614
2016-07-05T14:54:00.000
1
0
0
0
python,database,module,path,openerp
38,218,401
1
false
0
0
In your openerp-server.conf file on line addons_path add your custom path, just put comma and place your path. Restart server after that, update module list.
1
1
0
I am looking for a way to update the currently installed module's path. I want to move the module from one addons folder to a different one and my attempt to just move the module and then Update Modules List gives me nothing. The module is not found and only a grayed out module name is left in the modules list. Maybe t...
How to update module path that is already installed? Odoo
0.197375
0
0
620
38,207,914
2016-07-05T16:01:00.000
1
0
0
0
python,django,git,django-rest-framework
38,208,333
2
false
1
0
I will go with python package, after all this is what it is for.
1
0
0
I have to find a solution for sharing code between two big Django projects. The main things to share are models and serializers and template tags. I've came up with 3 different solutions and I need you to find pro and cons to be able to make a choice. I'll list you the solutions I found: git submodules Create a reposit...
Most efficient solution for sharing code between two django projects
0.099668
0
0
1,082
38,207,942
2016-07-05T16:03:00.000
1
0
1
0
python,r,jupyter,cairo
38,773,030
1
false
0
0
I had the precise same issue and fixed it by installing Cairo package: install.packages("Cairo")` library(Cairo) Thanks to my collegue Bartek for providing this solution
1
2
1
It's my first time using R in jupyter. I've installed everything like jupyter, python, R and lRkernel. I can use just typing or calculation in jupyter but whenever I want to use a graph library like plot or ggplot2 it shows Error in loadNamespace(name): there is no package called 'Cairo' Traceback: plot without titl...
Error in loadNamespace(name) Cairo
0.197375
0
0
411
38,209,343
2016-07-05T17:32:00.000
0
0
1
0
python,windows,installation,iexpress
38,213,178
1
false
0
0
Ultimately, I decided it was simpler to just put all of the source code and directory trees in a ZIP file and give the user careful instructions on how to add those trees to their PATH. Thanks anyway for the help guys.
1
0
0
I am trying to create an installation package for my program that I can send to other people who don't have any programming background and presumably cannot use the command line. The program itself is fairly user friendly, but it requires the installation of several Python packages from the Python Package Index to func...
Creating an Installation Package That Grabs Python Modules From the Web
0
0
0
133
38,210,820
2016-07-05T19:04:00.000
0
0
0
0
python,apache-spark-mllib,bayesian,lda
53,956,744
1
false
0
0
i think the matrix is m*n m is the words number and n is the topic number
1
3
1
The output of LDAModel.topicsMatrix() is unclear to me. I think I understand the concept of LDA and that each topic is represented by a distribution over terms. In the LDAModel.describeTopics() it is clear (I think): The highest sum of likelihoods of words of a sentence per topic, indicates the evidence of this tweet b...
What is the output of Spark MLLIB LDA topicsmatrix?
0
0
0
391
38,213,691
2016-07-05T22:13:00.000
0
0
0
1
python,windows,git,clearcase
38,217,644
1
false
0
0
Since a git hook executes itself in a git bash, check if that affect how the parameters are passed to the windows executable clearfsimport (especially the path) One simple test: wrap your clearfsimport call in a .bat script, and set the source and destination path in that script, then make your git hook call said scrip...
1
1
0
I am running in Windows and have a git post-receive hook that calls a python 3 script. This Python script does a number of things. One of these is to output the username running the git hook. This username is MACHINENAME$ (where the machine name is MACHINENAME), which I think is the Network Service account, but I could...
Change git hook credentials in Windows
0
0
0
70
38,215,657
2016-07-06T02:48:00.000
0
0
0
0
python,django,redirect,oauth-2.0,mailchimp
38,216,891
1
false
1
0
Your email_host, user, password and port match with your mail-chimp credentials? second thing you need to check mail-chimp api log for status. you will get some glimpse from there.
1
0
0
I am trying to set up Oauth2 with the Mailchimp API. So far things seem to be working correctly except that after having the user login at Mailchimp, the browser doesn't redirect back to my redirect_uri. It just stays on the Mailchimp login page. For the code: I redirect the user to the authorize url/mailchimp login:...
why am I not being redirected in the browser after Mailchimp API oauth2 initial request is sent?
0
0
0
356
38,216,399
2016-07-06T04:36:00.000
1
0
1
0
python,windows,python-3.x,command-line,jupyter
38,217,022
1
false
0
0
You probably do not have Python in your system variables. Press Windows+Pause/Break Click Advanced System Settings (you need admin rights here) Click Environment Variables In the lower part where it says "System Variables" click on the line that says PATH and then on "Edit" Append to that sequence of paths your Pytho...
1
0
0
Running on Windows 10. New to Python. Just installed python 3 and installed jupyter via pip. I cannot get jupyter notebook to run. Everything is under this path: C:\Users\user\AppData\Local\Programs\Python\Python35-32> I figured I could just type jupyter notebook in the prompt but it's not working. Do I have to in...
Running Jupyter notebook
0.197375
0
0
1,225
38,216,690
2016-07-06T05:11:00.000
1
0
0
0
python,robotframework
38,220,509
1
false
0
0
As the collections library is a builtin library, you will need to upgrade to Robot Framework 3.0 to get those non-existing changes, you won't be able to get it individually. It should work with Python 2.7 without issue.
1
0
0
I am using RIDE 1.5.2.1 running on Python 2.7.11 but found some features from Collections 3.0 are not existing. Can I upgrade upgrade Ride but still use Python 2.7? Or there is a way to only upgrade the collections library? Thanks.
Is RIDE 1.5.2.1 possible to work with Collection 3.0?
0.197375
0
0
44
38,217,297
2016-07-06T06:10:00.000
0
0
1
0
python,dronekit
38,236,476
1
false
0
0
Try flying with APM:Copter 3.3
1
0
0
Running dronekit-python with ArduCopter as SITL was successful.(APM:Copter V3.4-dev) Then,I run the same code on the real copter(APM:Copter V3.2.1) is not work. The code is from dronekit's example. Any ideas or pointers are appreciated.
Dronekit python goto_position_target_local_ned()
0
0
0
148
38,218,132
2016-07-06T07:09:00.000
-1
0
1
0
python,python-3.x,pip
38,218,276
3
false
1
0
pip uninstall currently doesn't support removing the dependencies. You can manually go to the folder where scrapy is installed and delete it. For example: /usr/local/lib/python2.7/dist-packages/scrapy. For example if it is at '/PATH/TO/SCRAPY', run this command on the terminal: sudo rm -rf /PATH/TO/SCRAPY
1
0
0
I had installed Scrapy with pip install scrapy. It also install all its requirement packages Installing collected packages: zope.interface, Twisted, six, cssselect, w3lib, parsel, pycparser, cffi, pyasn1, idna, cryptography, pyOpenSSL, attrs, pyasn1-modules, service-identity, queuelib, PyDispatcher, scrapy. So, is it p...
Pip uninstall Scrapy with all its dependencies
-0.066568
0
0
5,640
38,220,530
2016-07-06T09:25:00.000
0
0
0
1
python,docker
38,221,268
1
false
1
0
You should copy your production-ready config file into the docker container as part of your image-building process (COPY directive in your dockerfile), and then proceed with the same deployment steps you would normally use.
1
0
0
I used to deploy Python web applications on AWS EC2 instances with Ansible. In my development environment, I use config from a module local_config.py, but in the deployment process, I use an Ansible task to replace this file with a production-ready config. How do I do something similar when building a Docker image?
How to add a production config when deploying a docker container?
0
0
0
38
38,222,375
2016-07-06T10:59:00.000
0
0
0
0
python,sql,django,migration
38,225,266
1
false
1
0
The first approach I'd try would be to check out the last good commit and recreate the model changes in question so the migration could be regenerated and checked in. And while it's good to have a contingency plan for things like this, if it's a real concern I'd suggest evaluating your deployment process to make this ...
1
0
0
While this shouldn't happen its not impossible. So what to do in the event that a migration has been run into a database and the migration file has then been deleted and is not recoverable? this assumes that the database cannot just be dropped.
If a django migration is migrated to db, what is the best practice if the migration is deleted at a later date?
0
0
0
37
38,223,546
2016-07-06T12:04:00.000
1
0
0
0
java,python-2.7,machine-learning,scikit-learn,jepp
43,283,828
2
false
0
0
The _PyThreadState_Current error implies that it's using the wrong Python. You should be able to fix it by setting PATH and LD_LIBRARY_PATH to the python/bin and python/lib directories you want to use (and built Jep and sklearn against) before launching the process. That will ensure that Python, Jep, and sklearn are ...
1
0
1
I am using jep for running python script in java, I basically need to run the script that uses scikit package. But it shows me error when I try to run, which I couldn't understand. This is the piece of code in my program, Jep jep = new Jep(); jep.eval("import sklearn"); It shows the below error,but sklearn works perfe...
jep for using scikit model in java
0.099668
0
0
860
38,223,687
2016-07-06T12:10:00.000
1
0
0
0
python,matlab,matplotlib,spectrogram
38,223,850
2
false
0
0
The value in Matlab is a scalar as it represents the size of the window, and Matlab uses a Hamming window by default. The Window argument also accepts a vector, so you can pass in any windowing function you want.
2
1
1
I am trying to incorporate a preexisting spectrogram from Matlab into my python code, using Matplotlib. However, when I enter the window value, there is an issue: in Matlab, the value is a scalar, but Matplotlib requires a vector. Why is this so?
Difference between Matlab spectrogram and matplotlib specgram?
0.099668
0
0
865
38,223,687
2016-07-06T12:10:00.000
1
0
0
0
python,matlab,matplotlib,spectrogram
38,225,574
2
true
0
0
The arguments are just organized differently. In matplotlib, the window size is specified using the NFFT argument. The window argument, on the other hand, is only for specifying the window itself, rather than the size. So, like MATLAB, the window argument accepts a vector. However, unlike MATLAB, it also accepts a fu...
2
1
1
I am trying to incorporate a preexisting spectrogram from Matlab into my python code, using Matplotlib. However, when I enter the window value, there is an issue: in Matlab, the value is a scalar, but Matplotlib requires a vector. Why is this so?
Difference between Matlab spectrogram and matplotlib specgram?
1.2
0
0
865
38,227,501
2016-07-06T15:11:00.000
3
0
1
1
ipython
38,227,674
2
false
0
0
So I figured out a solution - I changed the environment variable PATH to the subfolder with the .exe files. Although the path including this subfolder was listed under %env, it did not work without being referred directly in the System setting.
1
2
0
I changed the environment variable PATH, to a new value and then back to what I believe was the original one. But now I can't open a .ipynb file through the Windows command line the was I was used to. After changing the directory in command line and running ipython notebook notebook_name.ipynb I get the following mess...
ipython from windows command line
0.291313
0
0
6,717
38,228,088
2016-07-06T15:40:00.000
2
0
0
0
python,numpy,scipy,scikit-learn,anaconda
38,233,222
2
false
0
0
If your code uses linear algebra, check it. Generally, roundoff errors are not deterministic, and if you have badly conditioned matrices, it can be it.
1
10
1
I have a very strange problem that I get different results on the same code and same data on different machines. I have a python code based on numpy/scipy/sklearn and I use anaconda as my base python distribution. Even when I copy the entire project directory (which includes all the data and code) from my main machine ...
Same Python code, same data, different results on different machines
0.197375
0
0
6,808
38,230,178
2016-07-06T17:31:00.000
1
0
0
0
python,ruby-on-rails,heroku,transfer
38,232,752
1
false
1
0
I would suggest writing a secured JSON or XML API to transfer the data from app to app,. Once the data is received I would then generate the .csv or .html files from the received data. It keeps things clean and easy to modify for future revisions because now you'll have an API to interact with.
1
0
0
I need to setup a Heroku app (python) which would perform scheduled tasks that include fetching a set of data (.csv an .html) files from other Heroku app (ROR) and returning a result back to that app. Also it should be restricted only to my app to be able to connect to the ROR app because it deals with sensitive infor...
Securely transfer a banch of files from one Heroku app to another
0.197375
0
0
46
38,230,462
2016-07-06T17:46:00.000
2
0
0
0
python,matplotlib,graph,data-science
38,230,601
2
true
0
0
Matplotlib gives you a nice level of access: you can change all details of the plots, modify ticks, labels, spacing, ... it has many sensible defaults, so a oneliner plot(mydata) produces fairly nice plots it plays well with numpy and other numerical tools, so you can pass your data science objects directly to the plo...
2
0
1
Hi, I feel like this question might be completely stupid, but I am still going to ask it, as I have been thinking about it. What are the advantages, of using a plotter like matplotlib, instead of an existing software, or grapher. For now, I have guessed that although it takes a lot more time to use such a library, you ...
Why use matplotlib instead of some existing software/grapher
1.2
0
0
146
38,230,462
2016-07-06T17:46:00.000
3
0
0
0
python,matplotlib,graph,data-science
38,230,638
2
false
0
0
Adding to Robin's answer, I think reproducibility is key. When you make your graphs with matplotlib, since you are coding everything rather than using an interface, all of you work is reproducible, you can just run your script again. Using other software, specifically programs with user interfaces, means that each time...
2
0
1
Hi, I feel like this question might be completely stupid, but I am still going to ask it, as I have been thinking about it. What are the advantages, of using a plotter like matplotlib, instead of an existing software, or grapher. For now, I have guessed that although it takes a lot more time to use such a library, you ...
Why use matplotlib instead of some existing software/grapher
0.291313
0
0
146
38,233,057
2016-07-06T20:20:00.000
0
0
1
0
python
38,233,116
8
false
0
0
There's a couple options here. The simplest would be to iterate over the array and stop when a) you've reached the end of the array OR b) the value at the current position is larger than the one you're looking for. Then simply return the last value found. (One edge case to consider: what happens if the number requested...
2
3
0
Considering a list like [0,3,7,10,12,15,19,21], I want to get the nearest minimum digit closest to any value, so if I pass 4, I would get 3, and if I pass 18, I would get 15, etc.
python recipe: list item nearest equal to value
0
0
0
143
38,233,057
2016-07-06T20:20:00.000
0
0
1
0
python
38,233,148
8
false
0
0
If your list is small, iterating through it is the best bet. You'll avoid some overhead, plus there's no point in over-engineering this task. If you want your code to be a bit more "correct", or if you want this to scale well on larger inputs, I'd recommend a binary search approach. This is, of course, assuming that yo...
2
3
0
Considering a list like [0,3,7,10,12,15,19,21], I want to get the nearest minimum digit closest to any value, so if I pass 4, I would get 3, and if I pass 18, I would get 15, etc.
python recipe: list item nearest equal to value
0
0
0
143
38,235,099
2016-07-06T22:54:00.000
0
0
1
0
python,dll,environment,cx-freeze,unqlite
38,306,009
1
false
0
0
Well, I have finally found the solution. I took a monitor software to look at the DLL load in my machine. I filtred all files with my process and the DLL in loaded path. In one hand, it was one python DLL which were missing. On an other hand, Cython expected one library from microsoft visual C++ runtime environnement. ...
1
0
0
In my machine (Windows), I can use my executable of my python program. But if I try on the machine of another person(Windows), it doesn't work. The executable blocks at the line : from unqlite import UnQLite I have fixed his dependency in packages variable: options={'build_exe':{'include_files':includefiles,'packages':...
Python exe - Cx_Freeze - ImportError DLL load failed
0
0
0
349
38,235,295
2016-07-06T23:14:00.000
0
0
0
0
sockets,python-3.x,graphite,plaintext
38,251,602
1
true
0
0
My code actually worked. For some reason, the graph itself did not update. So sock.sendall(message.encode()) actually does work for the plaintext protocol.
1
0
0
Looking at Graphite's latest documentation, I see that I can feed data into Graphite via plaintext. But I can't seem to find a way in Python 3 to send plaintext via the server ip address and port 2003. All I can seem to do is send bytes via sock.sendall(message.encode()) and Graphite does not seem to read that. Is ther...
How do I send plaintext via Python 3 socket library?
1.2
0
1
740
38,236,636
2016-07-07T02:12:00.000
5
1
1
0
python,git
38,236,672
3
true
0
0
There is, it's called a rebase - however, you'd probably want to add spaces to every file retroactively in each commit where you edited that file, which would be extremely tedious. However, there is absolutely nothing wrong with having a commit like this. A commit represents a change a distinct functioning state of you...
3
3
0
I have a Python project that I'm working on for research. I've been working on two different machines, and I recently discovered that half of my files used tabs and the other half used spaces. Python objected to this when I attempted to edit and run a file from one machine on the other, so I'd like to switch everything...
Is a format-only update a frivolous Git commit?
1.2
0
0
89
38,236,636
2016-07-07T02:12:00.000
0
1
1
0
python,git
38,284,795
3
false
0
0
It is perfectly valid. Coupling a white space reformat with other changes in the same file could obfuscate the non white space changes. The commit has a single responsibility to reformat white space.
3
3
0
I have a Python project that I'm working on for research. I've been working on two different machines, and I recently discovered that half of my files used tabs and the other half used spaces. Python objected to this when I attempted to edit and run a file from one machine on the other, so I'd like to switch everything...
Is a format-only update a frivolous Git commit?
0
0
0
89
38,236,636
2016-07-07T02:12:00.000
3
1
1
0
python,git
38,236,665
3
false
0
0
Unfortunately there is no way around the fact that at the textual level, this is a big change. The best you can do is not mix whitespace changes with any other changes. The topic of a such a commit should be nothing but the whitespace change. If this screwup is unpublished (only in your private repos), you can go back ...
3
3
0
I have a Python project that I'm working on for research. I've been working on two different machines, and I recently discovered that half of my files used tabs and the other half used spaces. Python objected to this when I attempted to edit and run a file from one machine on the other, so I'd like to switch everything...
Is a format-only update a frivolous Git commit?
0.197375
0
0
89
38,238,858
2016-07-07T06:34:00.000
1
0
0
0
python,sqlalchemy,migration
38,949,945
1
true
0
0
The best method is to just execute sql. In this casesession.execute("DROP INDEX ...")
1
1
0
I want to do a bulk insertion in SQL alchemy and would prefer to remove an index prior to making the insertion, reading it when the insertion is complete. I see adding and removing indexes is supported by Alembic for migrations, but is this possible with SQLAlchemy? If so, how?
Drop and read index using SQLAlchemy
1.2
1
0
1,562
38,241,463
2016-07-07T09:05:00.000
0
0
0
1
python,openstack,openflow,opendaylight
38,247,806
2
false
0
0
Hmm, well, you could consult the OPNFV (Open Platform for Network Function Virtualization) project. OPNFV builds an integrated release of OpenStack with OpenDaylight as the SDN controller.
1
0
0
strong texti need your help , i would like to do intergartion between openstack liberty(devstack) and opendaylight Beryllium. some one who know whow? i check lot of in internet but always the same documentation .
Integration openstack &opendaylight
0
0
0
69
38,247,070
2016-07-07T13:42:00.000
1
0
1
0
python,vpn,tor
38,247,424
1
true
0
0
This has very little to do with your connection. The server is simply drowning in requests. More requests from different locations won't help you. A faster connection might help you get into the queue before anyone else, but multiple connections won't help. If you really want tickets, figure out how to move through the...
1
0
0
I have a hypothesis that you could increase your chances of getting tickets for sell-out events by attempting to access the website from multiple locations. Just to be clear i'm not trying to be that guy who buys ALL of the tickets for events and then sells them on at 10X the price, incidentally i'm talking specificall...
Programmatically access one website from multiple locations?
1.2
0
1
206
38,248,928
2016-07-07T15:03:00.000
2
1
1
0
python,git
38,249,044
3
true
0
0
Include in git repo code to read those things from environment variables. On the target machine, set those environment variables. This could be done by hand, or with a script that you don't include in your repo. Include instructions in your readme file
2
4
0
I need to push Python script to Git repo. Script contains variables with personal data like USER_NAME = "some_name" and USER_PASS = "some_password". This data could be accessible for other users. I want to hide this data. I found following approach: create separate data.py module with USER_NAME = "some_name" and USER...
How to hide personal data in Python script
1.2
0
0
940
38,248,928
2016-07-07T15:03:00.000
1
1
1
0
python,git
38,296,218
3
false
0
0
You should never put sensitive pieces of information inside your code neither store them into a public repository. It's better to follow Joel Goldstick's suggestion and modify your code to get passwords from private sources, e.g. local environment variables or local modules. Try googling for "python store sensitive inf...
2
4
0
I need to push Python script to Git repo. Script contains variables with personal data like USER_NAME = "some_name" and USER_PASS = "some_password". This data could be accessible for other users. I want to hide this data. I found following approach: create separate data.py module with USER_NAME = "some_name" and USER...
How to hide personal data in Python script
0.066568
0
0
940
38,249,110
2016-07-07T15:10:00.000
2
0
0
0
python,panda3d
38,314,470
2
true
0
0
I am also new at Panda3D and I solved a problem similar to yours just a few hours ago. There are two ways to solve your Problem: Download another version of Blender. The last version working with YABEE is 2.66. Just export your model as a .x file (DirectX native) this works great with Panda3D
2
2
0
I am a beginner in panda3d, recently i came across blender 2.77 for modelling. I was disapointed to find that it cannot export egg files supported by panda3d, i searched online and found yabee and chicken but after installing those addons to blender also, i did'nt find an egg file exporter in the exporter's list. I tri...
cannot convert to egg file for panda3d
1.2
0
0
1,220
38,249,110
2016-07-07T15:10:00.000
2
0
0
0
python,panda3d
40,102,258
2
false
0
0
Common error when using YABEE: Not only do you need to copy it into the addons directory, you also need to activate it in Blender.
2
2
0
I am a beginner in panda3d, recently i came across blender 2.77 for modelling. I was disapointed to find that it cannot export egg files supported by panda3d, i searched online and found yabee and chicken but after installing those addons to blender also, i did'nt find an egg file exporter in the exporter's list. I tri...
cannot convert to egg file for panda3d
0.197375
0
0
1,220
38,252,931
2016-07-07T18:35:00.000
0
0
0
0
python,linux,windows,scikit-learn,pickle
39,263,619
1
false
0
0
Python pickle should run between windows/linux. There may be incompatibilities if: python versions on the two hosts are different (If so, try installing same version of python on both hosts); AND/OR if one machine is 32-bit and another is 64-bit (I dont know any fix so far for this problem)
1
0
1
I am trying to save a sklearn model on a Windows server using sklearn.joblib.dump and then joblib.load the same file on a linux server (centOS71). I get the error below: ValueError: non-string names in Numpy dtype unpickling This is what I have tried: Tried both python27 and python35 Tried the built in open() with 'wb...
Dump Python sklearn model in Windows and read it in Linux
0
0
0
610
38,252,992
2016-07-07T18:39:00.000
0
0
1
0
python,python-2.7,python-3.x,pip,cloud9-ide
38,257,510
3
true
0
0
You can't use pip to install Python 3. In any case, since you specifically mentioned the Cloud9 IDE, it already comes with both Python 2 and 3. python is symlinked to python2 though, so if you want to call Python 3, you have to type python3 (instead of just python) in the terminal.
1
0
0
Currently using Cloud9's ACE IDE dev environment for some learning opportunities, however, I ran into an API that is exclusively made for Python 3. How can I pip install Python 3 while keeping python 2.7.6 (the current version) intact?
How can I use pip to pip install Python 3 in Ubuntu terminal?
1.2
0
0
248
38,256,104
2016-07-07T22:12:00.000
0
0
0
0
python,pandas,join,merge,concat
65,132,518
7
false
0
0
Only concat function has axis parameter. Merge is used to combine dataframes side-by-side based on values in shared columns so there is no need for axis parameter.
2
141
1
What's the essential difference(s) between pd.DataFrame.merge() and pd.concat()? So far, this is what I found, please comment on how complete and accurate my understanding is: .merge() can only use columns (plus row-indices) and it is semantically suitable for database-style operations. .concat() can be used with eith...
Difference(s) between merge() and concat() in pandas
0
0
0
114,669
38,256,104
2016-07-07T22:12:00.000
14
0
0
0
python,pandas,join,merge,concat
49,564,930
7
false
0
0
pd.concat takes an Iterable as its argument. Hence, it cannot take DataFrames directly as its argument. Also Dimensions of the DataFrame should match along axis while concatenating. pd.merge can take DataFrames as its argument, and is used to combine two DataFrames with same columns or index, which can't be done with ...
2
141
1
What's the essential difference(s) between pd.DataFrame.merge() and pd.concat()? So far, this is what I found, please comment on how complete and accurate my understanding is: .merge() can only use columns (plus row-indices) and it is semantically suitable for database-style operations. .concat() can be used with eith...
Difference(s) between merge() and concat() in pandas
1
0
0
114,669
38,257,055
2016-07-07T23:57:00.000
1
1
0
1
python,network-programming
38,258,777
2
false
0
0
Backing up and copying configs to server. Automate certain config changes to adhere to standards. Scripts to copy run start on all devices at will. Finding various config entries on all devices that may need to be altered. There are so many possibilities. Search github and pastebin and the overflow sites for anything u...
1
1
0
I originally posted on his on Network Engineering but it was suggested that o post it on here. I've been learning Python and since I work in networking I'd like to start writing a few scripts that I can use in my day to day work tasks with switches. So my question is this, what network projects have you used python in...
Python Network Projects
0.099668
0
0
411
38,263,384
2016-07-08T09:35:00.000
1
0
0
0
python,caching,spacy
41,644,953
1
false
1
0
First of all you, if you only do NER, you can install the parser without vectors. This is possible giving the argument parser to: python -m spacy.en.download parser This will prevent the 700MB+ Glove vectors to be downloaded, slimming the memory needed for a single run. Then, well, it depends on your application/usage ...
1
1
0
I'm using spaCy with Python for Named Entity Recognition, but the script requires the model to be loaded on every run and takes about 1.6GB memory to load it. But 1.6GB is not dispensable for every run. How do I load it into the cache or temporary memory so as to enable the script to run faster?
How to save spaCy model onto cache?
0.197375
0
0
1,333
38,264,090
2016-07-08T10:10:00.000
2
0
1
0
python,windows,python-2.7,pip,kivy
38,264,328
1
true
0
0
I think you have to set PATH in environment variable for python command to work.If you're on windows follow this: My Computer > Properties > Advanced System Settings > Environment Variables > Then under system variables create a new Variable name PATH.Under value type your python installation directory which includes ...
1
0
0
I have been looking for the past hour regarding installing modules using. It says that python27 comes with pip, However when I type python -m pip install --upgrade pip wheel setuptools into the command line I just get the error NameError: Name 'python' is not defined. I cant even enter python --version. The module I a...
Cant find version or use pip using python27 command line
1.2
0
0
485
38,265,773
2016-07-08T11:43:00.000
4
0
1
0
python,vlc
38,265,916
5
true
0
0
I had a same issue. You should try sudo pip install python-vlc
2
7
0
I am trying to create a media player using vlc and python but it throws an Error which is No module named vlc. how to fix this?
Import Vlc module in python
1.2
0
0
30,496
38,265,773
2016-07-08T11:43:00.000
0
0
1
0
python,vlc
60,589,679
5
false
0
0
The answer didn't work for me, using Mu 1.0.2 on a Raspberry Pi, this did however: sudo pip3 install vlc
2
7
0
I am trying to create a media player using vlc and python but it throws an Error which is No module named vlc. how to fix this?
Import Vlc module in python
0
0
0
30,496
38,270,552
2016-07-08T15:37:00.000
0
0
0
0
python,sql-server,excel,hyperion,essbase
38,299,572
1
true
0
0
There are a couple of ways to go. The most straightforward is to export all of the data from your Essbase database using column export, then designing a process to load the data into SQL Server (such as using the import functionality or BULK IMPORT, or SSIS...). Another approach is to use the DataExport calc script co...
1
0
0
I'm currently using a mix of smart view and power query(sql) to load data into Excel models however my excel always crashes when smart view is used. I'm required to work in Excel but I'm know looking at finding a way to periodically load data from Essbase into my SQL server database and only use power query(sql) for al...
Load data from Essbase into SQL database
1.2
1
0
2,203
38,275,148
2016-07-08T20:46:00.000
3
1
1
0
python,class,oop,inheritance
38,275,281
5
true
0
0
In Python3, override the special method __getattribute__. This gives you almost complete control over attribute lookups. There are a few corner cases so check the docs carefully (it's section 3.3.2 of the Language Reference Manual).
2
3
0
I'd like to create an Python class that superficially appears to be a subclass of another class, but doesn't actually inherit its attributes. For instance, if my class is named B, I'd like isinstance(B(), A) to return True, as well as issubclass(B, A), but I don't want B to have the attributes defined for A. Is this po...
Python subclass that doesn't inherit attributes
1.2
0
0
2,382
38,275,148
2016-07-08T20:46:00.000
1
1
1
0
python,class,oop,inheritance
38,275,187
5
false
0
0
As long as you're defining attributes in the __init__ method and you override that method, B will not run the code from A's __init__ and will thus not define attributes et al. Removing methods would be harder, but seem beyond the scope of the question.
2
3
0
I'd like to create an Python class that superficially appears to be a subclass of another class, but doesn't actually inherit its attributes. For instance, if my class is named B, I'd like isinstance(B(), A) to return True, as well as issubclass(B, A), but I don't want B to have the attributes defined for A. Is this po...
Python subclass that doesn't inherit attributes
0.039979
0
0
2,382
38,275,243
2016-07-08T20:53:00.000
1
0
1
0
python,pycharm
38,285,332
1
true
0
0
That's a numbered bookmark. You can remove it by selecting the file in Project view and pressing Ctrl-Shift-9.
1
4
0
I noticed a number inside a square that looks like [9] next to a file that I have in Pycharm Community Edition on the dock on the left side that I do not understand. I am unable to click on it or read any more information about it. I couldn't find anything on Pycharm's website or any of their documentation. I am slight...
PyCharm File Number Denotation
1.2
0
0
77
38,276,184
2016-07-08T22:23:00.000
0
0
1
1
python-2.7,flask,windows-7,ubuntu-14.04
38,276,238
1
false
0
0
Are you accessing/manipulating Operating system specific information ? For example, some file attributes, other than the basic attributes, are different on both systems.
1
0
0
Is it fine to work on Ubuntu while another person working with me on the same project is working on Windows 7? We are using Python 2.7, and Flask, and have set up matching virtual environments.
Is it okay to work on Ubuntu while another person working on the same project is working on Windows 7?
0
0
0
26
38,278,626
2016-07-09T05:16:00.000
1
0
1
0
android,qpython,qpython3
38,304,956
1
true
0
1
Open the "qpython3" app then touch "Console" and in the top left corner touch "No. 1" or "No. 2" or ... then select your background running scripts and by touching "X" sing you can kill them.
1
0
0
I am using Qpython3 on my Android tablet. I have a Python script for a talking alarm clock that I would like to run in the background and then go off at the time the user sets. The problem is, once I set the console running in the background, I can't figure out how to get back to it to stop the script (i.e. get the mes...
How do I stop a script that is running in the background in Qpython3?
1.2
0
0
1,123
38,280,859
2016-07-09T10:30:00.000
2
0
0
0
python,reactjs,django-forms
38,281,765
1
true
1
0
The {{ form }} statement is relative to Django template. Django templates responsible for rendering HTML and so do React, so you don't have to mix the two together. What you probably want to do is to use the Django form validation mechanism server side, let React render the form client-side. In your Django view, simply...
1
4
0
Is there any way I can use Django forms inside a ReactJS script, like include {{ form }} in the JSX file? I have a view which displays a from and it is rendered using React. When I load this page from one page the data in these fields should be empty, but when I hit this view from another page I want date to be prefil...
Django forms in ReactJs
1.2
0
0
1,649
38,288,839
2016-07-10T05:17:00.000
12
0
0
0
python,caching,redis,push,empty-list
38,289,365
1
false
0
0
Empty lists do not exist in Redis - a list must have one or more items. Empty lists (e.g. as a result of popping a non-empty one) are automatically removed.
1
6
0
We'd like to RPUSH/LPUSH a key with an empty list. This is for consistency reasons: when the key is read with LRANGE than whether the list is empty or not, the rest of the code behaves the same. Why the fact that if a key has an empty list it is deleted is a problem? Because we are using Redis as a cache and would li...
Redis - how to RPUSH/LPUSH an empty list
1
0
0
4,614
38,291,388
2016-07-10T11:29:00.000
2
0
0
0
python,html,django,dynamic,jinja2
38,301,898
2
true
1
0
I found a solution that works out pretty well. I use <link rel="stylesheet" href="{% block css %}{% endblock %}"> in the template and then: {% block css%}{% static 'home/css/file.css' %}{% endblock % in each page
1
2
0
I am trying to make my stylesheets dynamic with django (jinja2) and I want to do something like this: <link rel="stylesheet" href="{% static 'home/css/{{ block css }}{{ endblock }}.css' %}"> Apparently, I can't use Jinja in Jinja :), and I don't know how to make this work another way.
Dynamic css import with Jinja2
1.2
0
0
1,671
38,291,701
2016-07-10T12:07:00.000
1
0
0
0
python,csv
38,291,737
2
false
0
0
You should always try to use as much as possible the work that other people have already been doing for you (such as programming the pandas library). This saves you a lot of time. Pandas has a lot to offer when you want to process such files so this seems to me to be the the best way to deal with such files. Since the ...
1
1
1
Forgive me if my questions is too general, or if its been asked before. I've been tasked to manipulate (e.g. copy and paste several range of entries, perform calculations on them, and then save them all to a new csv file) several large datasets in Python3. What are the pros/cons of using the aforementioned libraries? ...
Using pandas over csv library for manipulating CSV files in Python3
0.099668
0
0
114
38,292,311
2016-07-10T13:20:00.000
2
0
1
0
python,class,object,dictionary
38,292,336
2
false
0
0
All values in Python are objects, dictionaries included. Dictionaries have methods too! For example, dict.keys() is a method, so Python's dict instances are not objects with only data members. There is a class definition for dictionaries; just because it is defined in the Python C code doesn't make dict any less a clas...
2
0
0
I am studying Python right now and I am learning about Dictionaries. Is it correct to compare dictionaries with objects from C++ who only contain data members and no methods? Of course there is not class definition so every object instance can be declared differently in Python, but still I think it i a good analogy to...
Can Dictionaries in Python be considered objects from C++ with only Data Members?
0.197375
0
0
224
38,292,311
2016-07-10T13:20:00.000
3
0
1
0
python,class,object,dictionary
38,292,385
2
false
0
0
Is it correct to compare dictionaries with objects from C++ who only contain data members and no methods? NO A dictionary is a data-structure which is analogous to std::unordered_map, though the implementation might differ. An object is an instance of a class. Both C++ and Python supports Object Oriented programming to...
2
0
0
I am studying Python right now and I am learning about Dictionaries. Is it correct to compare dictionaries with objects from C++ who only contain data members and no methods? Of course there is not class definition so every object instance can be declared differently in Python, but still I think it i a good analogy to...
Can Dictionaries in Python be considered objects from C++ with only Data Members?
0.291313
0
0
224
38,292,478
2016-07-10T13:37:00.000
0
0
0
0
python,particle-filter
44,927,182
1
false
0
0
It is completely normal that particles get distributed everywhere. Otherwise it is not a probabilistic approach. In addition, note that the particles are sampled based on the posterior probability at time t-1 and the current motion distribution. However, even if it is not recommended in filtering but you can restrict y...
1
1
0
I have just implemented a particle filter for Indoor Tracking. It looks good but at some points the particles go in a room and are trapped there. What's a smart way to do backtracking? I save the state of the particles for their last 10 movements. Thank you
Backtracking with Particle Filter
0
0
0
304
38,295,148
2016-07-10T18:24:00.000
0
0
1
0
python,database,kivy
38,304,824
1
false
0
0
Both approaches have pros and cons. A database is designed to store and query data. You can query data easily (SQL) from multiple processes. If you don't have multiple processes and no complicated querys a database doesn't really offers that much. Maybe persistence if that is a concern for you. If you don't need the fe...
1
0
0
I work on a raspberry pi project and use Python + Kivy for such reasons: I read some string values comming from a device installed in a field every 300ms. As soon as I see certain value I trigger a python thread to run another function which takes the string and stores it in a list and timestamp it. My kivy app displa...
is it better to read from LIST or from Database?
0
1
0
56
38,297,010
2016-07-10T22:31:00.000
0
0
1
0
python,python-3.x
63,151,807
4
false
0
0
Closing the console in Windows and reopening it fixes the issue for me. I got the error when doing sudo apt update.
1
8
0
The full error is: OverflowError: timestamp too large to convert to C _PyTime_t I have no idea what this means, and have not been able to find it anywhere else online. I am new to python so it may be something really simple that I'm missing. The error is coming from this line of code within a function: time.sleep(t) t...
What does this overflow error in python mean?
0
0
0
3,308
38,297,765
2016-07-11T00:52:00.000
2
0
0
0
python,image-processing,scikit-image,glcm
38,297,891
1
true
0
0
The simplest way for binning 8-bits images is to divide each value by 32. Then each pixel value is going to be in [0,8[. Btw, more than avoiding sparse matrices (which are not really an issue), binning makes the GLCM more robust to noise.
1
1
1
I am trying to find the GLCM of an image using greycomatrix from skimage library. I am having issues with the selection of levels. Since it's an 8-bit image, the obvious selection should be 256; however, if I select values such as 8 (for the purpose of binning and to prevent sparse matrices from forming), I am getting ...
Grey Level Co-Occurrence Matrix // Python
1.2
0
0
2,092
38,298,459
2016-07-11T02:47:00.000
7
0
0
0
javascript,python,selenium,web-scraping
38,298,895
2
false
1
0
Ideally you don't even need to clicks buttons in these kind of cases. All you need is to see at what webservice does the form sends request when clicked on submit button. For that open your developer's control in the browser, Go to the Network tab and select 'preserve log'. Now submit the form manually and look for th...
1
5
0
I am working on a small project where I have to submit a form to a website. The website is, however, using onclick event to submit the form (using javascript). How can the onclick event be simulated in python? Which modules can be used? I have heard about selenium and mechanize modules. But, which module can be use...
How can I simulate onclick event in python?
1
0
1
13,226
38,298,752
2016-07-11T03:31:00.000
0
0
0
1
python,macos
71,665,360
3
false
0
0
I [believe I] resolved this by chown'ing and chgrp'ing everything in /usr/local/Cellar and then unlinking and relinking: ------ % brew link python3 Linking /usr/local/Cellar/python/3.6.5... Error: Could not symlink bin/2to3 Target /usr/local/bin/2to3 is a symlink belonging to python@3.9. You can unlink it: brew unlink ...
1
1
0
I am trying to re-install python3 on my mac using brew by brew install python3. But when proceeding to the the link step, it threw an error: The brew link step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink bin/2to3-3.5 Target /usr/local/bin/2to3-3.5 already ...
Linking /usr/local/Cellar/python3/3.5.1... Error: Permission denied - /usr/local/Frameworks
0
0
0
1,544
38,301,047
2016-07-11T07:09:00.000
1
0
1
0
python,environment-variables,kivy
38,301,272
2
false
0
1
Make sure you're running the command from the folder where the *.py file is located, "kivy *.py" should run from there.
1
0
0
After the installation of Kivy 1.9.1 on Windows using the commands of Kivy installation tutorials, I can't run the program using "kivy ***.py". I don't know how to set up the environment variables, and I can't find it on the official websites. Kivy: 1.9.1 Python: 3.4.4 Windows 10 Please HELP! Thanks
How to run kivy after 1.9.1 on windows?
0.099668
0
0
662
38,301,675
2016-07-11T07:47:00.000
1
0
1
0
python,ipython
38,302,182
1
false
0
0
Have you considered trying ipython notebook ? (I've used it on a couple of training courses) You access the interatctive python via a web browser creating 'boxes' of runnable code. So if you ran a block, it gave the answer you wanted and threw no errors, you could then create another block and move on (preserving the b...
1
1
0
I am learning python using IPython. When I did something nice I like to copy this into some kind of private CheatSheet-file. Therefore I use the iPython %hist command. I am wondering, if there is a way to only print those commands which had been syntactically correct and did not raise an error. Any ideas?
iPython history of valid commands
0.197375
0
0
104
38,303,322
2016-07-11T09:19:00.000
0
0
1
0
ipython,anaconda
38,400,193
1
true
0
0
The latest version of ipython has now been added to the anaconda package list. Choose: Anaconda navigator > Environment > Update index Then search for the ipython package: right click it and select version 5.0.0
1
0
0
How can I install ipython5 in the anaconda navigator? It currently is running 4.2.0, but the latest ipython release is not available as an option.
How can I install ipython5 in the anaconda navigator?
1.2
0
0
367
38,304,942
2016-07-11T10:42:00.000
0
0
0
0
python,scikit-learn,classification,multilabel-classification,voting
53,769,151
1
false
0
0
I thing Voting Classifier only accepts different static weights for each estimator. However you may solve the problem by assigning class weights with the class_weight parameter of the random forest estimator by calculating the class weights on your train set.
1
1
1
I was wondering if it is possible to use dynamic weights in sklearn's VotingClassifier. Overall i have 3 labels 0 = Other, 1 = Spam, 2 = Emotion. By dynamic weights I mean the following: I have 2 classifiers. First one is a Random Forest which performs best on Spam detection. Other one is a CNN which is superior for to...
Ensembling with dynamic weights
0
0
0
139
38,307,982
2016-07-11T13:15:00.000
0
0
1
0
python,python-3.x,utf-8
38,308,361
4
false
0
0
What do you mean exactly by "special utf-8 characters" ? If you mean every non-ascii character, then you can try: s.encode('ascii', 'strict') It will rise an UnicodeDecodeError if the string is not 100% ascii
1
0
0
I have a list of Strings in python. Now I want to remove all the strings from the list that are special utf-8 characters. I want just the strings which include just the characters from "U+0021" to "U+00FF". So, do you know a way to detect if a String just contains these special characters? Thanks :) EDIT: I use Python ...
How to detect if a String has specific UTF-8 characters in it? (Python)
0
0
0
4,331
38,308,310
2016-07-11T13:31:00.000
0
0
1
0
python
38,308,473
1
false
0
0
By default, python checks for the requested file in the same directory the program file is in. If you want python to check for the file in some other location, you have to specify the absolute path. About your error, nothing can be said unless you share your code.
1
0
0
From where does python pick its file for reading.Is there any specific folder,or does it pick from anywhere on the system just given the filename and extension.Is there a need to mention absolute path. I am getting error while reading txt and csv files as no such file or directory. f=open('info.csv') print f I g...
IOError while reading files
0
0
0
178
38,314,964
2016-07-11T19:43:00.000
1
0
0
0
python,tensorflow
38,317,151
1
false
0
0
Note that this exercise only speeds up the first step time by skipping the prefetching of a larger from of the data. This exercise does not speed up the overall training That said, the tutorial text needs to be updated. It should read Search for min_fraction_of_examples_in_queue in cifar10_input.py. If you lower thi...
1
1
1
The TensorFlow tutorial for using CNN for the cifar10 data set has the following advice: EXERCISE: When experimenting, it is sometimes annoying that the first training step can take so long. Try decreasing the number of images that initially fill up the queue. Search for NUM_EXAMPLES_PER_EPOCH_FOR_TRAIN in cifar10.py. ...
Speeding up TensorFlow Cifar10 Example for Experimentation
0.197375
0
0
174
38,317,462
2016-07-11T22:55:00.000
0
0
1
0
python,multithreading,multiprocessing
38,317,881
1
false
0
0
Based on Harp's second comment to his original post (which was posted after your answer), I suspect that you would now agree with me that processes are probably called-for here, based on this newly-supplied information. However, I find myself questioning just how much "truly effective concurrency" is likely to be found...
1
0
0
I wanted to get some help with an application... Currently I have a script that saves certain information to a database table, well call this table "x". I have another script that gets and saves other info to a different database table, well call this one "y". I also have a script that runs formulas on the information ...
Should I use Threads or multiple processess?
0
0
0
44
38,321,248
2016-07-12T06:15:00.000
1
0
0
0
python,numpy,theano,deep-learning,keras
38,353,930
1
false
0
0
This expression should do the trick: theano.tensor.tanh((x * y).sum(2)) The dot product is computed 'manually' by doing element-wise multiplication, then summing over the last dimension.
1
0
1
I am trying to apply tanh(dot(x,y)); x and y are batch data of my RNN. x,y have shape (n_batch, n_length, n_dim) like (2,3,4) ; 2 samples with 3 sequences, each is 4 dimensions. I want to do inner or dot production to last dimension. Then tanh(dot(x,y)) should have shape of (n_batch, n_length) = (2, 3) Which functio...
how to use dot production on batch data?
0.197375
0
0
291
38,321,820
2016-07-12T06:49:00.000
0
1
0
1
python,ssh,twisted.conch,password-prompt
38,324,034
1
false
0
0
The password prompt is part of keyboard-authentication which is part of the ssh protocol and thus cannot be changed. Technically, the prompt is actually client side. However, you can bypass security (very bad idea) and then output "your codes is"[sic] via the channel
1
0
0
I wrote a SSH server with Twisted Conch. When I execute "ssh username@xx.xx.xx.xx" command on the client side. My twisted SSH server will return a prompt requesting password that like "username@xx.xx.xx.xx's password: ". But now I want to change this password prompt that like "your codes is:". Dose anyone know how t...
Python SSH Server(twisted.conch) change the password prompt
0
0
0
122
38,323,412
2016-07-12T08:16:00.000
0
0
1
1
python,python-2.7,packages,installation-package
58,928,704
3
false
0
0
install with pip: pip3 install pyclustering it even works with Anaconda prompt
1
2
0
This is the error I am getting when trying to install PyCluster. I am using python 2.7 with anaconda in spyder IDE and on windows. Downloading/unpacking PyCluster Getting page http://pypi.python.org/simple/PyCluster URLs to search for versions for PyCluster: * httpss://pypi.python.org/simple/PyCluster/ Getting page h...
PyCluster unable to install package
0
0
0
4,769
38,327,327
2016-07-12T11:15:00.000
0
1
0
0
python,amazon-web-services,aws-lambda,amazon-sns
38,329,761
1
false
0
0
Exceptions of Lambda functions will be in your logs, which are streamed to AWS CloudWatch Logs. Execution time is stored as the Lambda Duration metric in CloudWatch. You would need to setup CloudWatch alerts on those items to be notified.
1
0
0
I'm using SNS to trigger lambda functions in AWS. This works fine and as expected, but I'm wondering if there is a way to get feedback about the execution times and if an exception was raised within the function. Obviously there is exception handling code in my lambda functions for most of the business logic, but I'm t...
Getting information about function execution time/billing and if the function call was successful
0
0
0
85
38,328,159
2016-07-12T11:52:00.000
0
0
1
0
python,scikit-learn
43,412,660
1
false
0
0
Several scikit-learn tools such as GridSearchCV and cross_val_score rely internally on Python’s multiprocessing module to parallelize execution onto several Python processes by passing n_jobs > 1 as argument. Taken from Sklearn documentation: The problem is that Python multiprocessing does a fork system call withou...
1
4
1
Does anybody use "n_jobs" of sklearn-classes? I am work with sklearn in Anaconda 3.4 64 bit. Spyder version is 2.3.8. My script can't finish its execution after setting "n_jobs" parameter of some sklearn-class to non-zero value.Why is this happening?
n_jobs don't work in sklearn-classes
0
0
0
1,402
38,330,752
2016-07-12T13:47:00.000
2
0
0
0
python,sublimetext2,sublimetext3,sublimetext,text-editor
38,330,853
2
false
1
0
In the menu bar: View > Layout > Single Or from the keyboard (on Windows): Alt + Shift + 1 To find your default shortcuts, Preferences > Key Bindings - Default, and search for "set_layout".
2
0
0
I was wondering how you exit the multiple row layout on Sublime Text. I switched to a 3 row layout when editing one of my Django projects, but how do I exit from it (remove the extra rows I have added). Thanks, Henry
Sublime Text: How do you exit the multiple row layout
0.197375
0
0
98
38,330,752
2016-07-12T13:47:00.000
2
0
0
0
python,sublimetext2,sublimetext3,sublimetext,text-editor
38,330,833
2
true
1
0
Use View -> Layout menu. If you choose View -> Layout -> Single, other rows will be removed. Short keys depends on OS.
2
0
0
I was wondering how you exit the multiple row layout on Sublime Text. I switched to a 3 row layout when editing one of my Django projects, but how do I exit from it (remove the extra rows I have added). Thanks, Henry
Sublime Text: How do you exit the multiple row layout
1.2
0
0
98
38,331,175
2016-07-12T14:04:00.000
0
0
1
0
python,ide,pycharm
38,331,228
1
false
0
0
PyCharm displays the Welcome screen when no project is open. From this screen, you can quickly access the major starting points of PyCharm. The Welcome screen appears when you close the current project in the only instance of PyCharm. If you are working with multiple projects, usually closing a project results in closi...
1
1
0
I switched to PyCharm a couple of months ago, but I can't figure out how to get rid of the welcome screen when I open files. More specifically, I've set up my mac to open all .py files using PyCharm. However, when I double click on a .py file, it's the Welcome screen that opens up and not the .py file. How do I get PyC...
PyCharm Directly Open Python File
0
0
0
393
38,340,729
2016-07-13T00:12:00.000
-1
0
1
1
python,python-3.x,stdin,piping
38,340,837
1
false
0
0
You can test if your program's input is connected to a tty, which may help, depending on your use case: $ python -c 'import sys; print(sys.stdin.isatty())' True $ echo hi | python -c 'import sys; print(sys.stdin.isatty())' False $ python -c 'import sys; print(sys.stdin.isatty())' < foo False
1
0
0
If my script needs to behave differently when it is being piped to versus when it is being called normally, how can I determine whether or not it is being piped to? This is necessary for avoiding hanging. I am not talking about merely checking whether or not stdin is empty or not.
Determine if script is being piped to in Python 3
-0.197375
0
0
172
38,341,325
2016-07-13T01:36:00.000
2
0
0
0
python,django,django-forms,django-admin
38,363,690
1
true
1
0
I fixed the issue by using an iframe to embed the page itself. I used the ?_popup=1 argument so that the navbar and other parts of the admin site wouldn't show up.
1
0
0
I am trying to embed the exact form that appears in the Django admin when I edit a model in a different page on my website. My plan is to have an Edit button that, when clicked, displays a modal with the edit page inside of it. The issue with using a ModelForm is that this particular model has two generic foreign keys....
Django Embed Admin Form
1.2
0
0
674
38,344,740
2016-07-13T07:03:00.000
0
0
1
0
java,python,search,nlp,semantics
38,437,943
1
false
0
0
Your questions is somewhat vague but I will try nonetheless... If I understand you correctly then what you want to do (depending on the effort you want to spend) is the following: Expand the keyword to a synonym list that you will use to search for in the topics (you can use WordNet for this). Use collocations (n-gram...
1
0
1
I want to do SEMANTIC keyword search on list of topics with NLP(Natural Language Processing ). It would be very appreciable if you post any reference links or ideas.
How to do semantic keyword search with nlp
0
0
0
296
38,348,268
2016-07-13T09:52:00.000
1
0
0
1
python,sockets,zeromq
38,349,487
1
true
0
0
The simplest is to create a logic for a pool-of-ports manager ( rather avoid attempts to share / pass ZeroMQ sockets to / among other processes ) One may create a persistent, a-priori known, tcp://A.B.C.D:8765-transport-class based .bind() access-point, exposed to all client processes as a port-assignment service, to ...
1
0
0
I have a Python program which spawns several other Python programs as subprocesses. One of these subprocesses is supposed to open and bind a ZMQ publisher socket, such that other subprocesses can subscribe to it. I cannot give guarantees about which tcp ports will be available, so when I bind to a random port in the su...
Moving a bound ZMQ socket to another process
1.2
0
0
324
38,354,633
2016-07-13T14:33:00.000
7
0
1
0
python,cyclomatic-complexity,code-metrics
38,357,619
4
false
0
0
Python isn't special when it comes to cyclomatic complexity. CC measures how much branching logic is in a chunk of code. Experience shows that when the branching is "high", that code is harder to understand and change reliably than code in which the branching is lower. With metrics, it typically isn't absolute values...
1
12
0
I have a relatively large Python project that I work on, and we don't have any cyclomatic complexity tools as a part of our automated test and deployment process. How important are cyclomatic complexity tools in Python? Do you or your project use them and find them effective? I'd like a nice before/after story if anyon...
Cyclomatic complexity metric practices for Python
1
0
0
10,581
38,356,263
2016-07-13T15:44:00.000
-3
0
0
0
python,tkinter
38,357,614
2
false
0
1
The forms toolkit offers precisely the components that it offers. If you are not happy with round radio buttons, then code in OSF/Motif, which offers diamond-shaped radio buttons. Either that, or you could hack the internals of the widget (sorry, "control": I am so accustomed to professional [= UNIX] terminology). T...
1
0
0
I am creating a GUI for an application, modeled off of one I have seen. This other application uses diamond-shaped radiobutton indicators from Python Tkinter, and I can't seem to find out how to use a diamond-shaped radiobutton in my program. All of my attempts at creating a radiobutton result in a circular shaped radi...
Diamond Shaped Radiobuttons in Python Tkinter
-0.291313
0
0
494
38,357,398
2016-07-13T16:44:00.000
2
0
1
1
ipython,keras
38,408,813
1
false
0
0
I don't think keras is the only problem. If you are using theano as a backend, it will create $HOME/.theano/ as well. One dirty trick is to export HOME=/data/username/, but other program than keras or ipython will also treat /data/username/ as $HONE. To avoid that, you can do this locally by calling HOME=/data/username...
1
2
0
When I'm in ipython and try to import keras, I get the error No space left on device: /home/username/.keras. How can I change this so that Keras does not use my HOME directory, and instead use /data/username/? I did the same for the directory ~/.ipython. I moved it to the desired location and then did export IPYTHONDIR...
Move .keras directory in Ubuntu
0.379949
0
0
680
38,358,671
2016-07-13T17:56:00.000
0
0
1
0
python,visual-studio-2015,ptvs
42,372,571
1
false
0
0
Similar problem here (VS Enterprise 2015 Update 3, PTVS 2.2.50113.00): I have a solution with many different project types (most of them C#) and ONE Python project. Opening the solution loads ALL projects but the one-and-only Python project. The Solution Explorer entry for that project displays an error message like "o...
1
0
0
Wondering if others are experiencing this...I've got a fresh install of VS 2015 with PTVS 2016 and I almost always have to open the .sln file twice since the first time it opens the project will fail to load (this failure is displayed in the solution explorer in VS). Perhaps there is a quick fix but I didn't see anyth...
loading of Python program in Visual Studio frequently fails first or second time
0
0
0
81
38,363,640
2016-07-14T00:15:00.000
3
0
1
0
python,hash
38,363,706
1
false
0
0
-1 is not "reserved as an error" in Python. Not sure what that would even mean. There are a huge number of programs you couldn't write simply and clearly if you weren't allowed to use -1. "Is there a problem?" No. Hash functions do not need to return a different hash for every object. In fact, this is not possible, sin...
1
7
0
I used Spyder, run Python 2.7. Just found interesting things: hash(-1) and hash(-2) both return -2, is there a problem? I though hash function on different object should return different values. I read previous posts that -1 is reserved as an error in Python. hash('s') returns 1835142386, then hash(1835142386) returns...
Why hash function on two different objects return same value?
0.53705
0
0
1,486
38,363,949
2016-07-14T00:59:00.000
1
0
0
0
python,sas,dataset
53,167,909
1
true
0
0
With the help of sas7bdat package you can access all sas datasets normally in local drive, and to use datasets from server use FTP or SFTP connections to read the file as a object and it's easy to access.
1
0
0
I am writing some code in Python with all the data available in SAS datasets both on Local hard drive and SAS server. The problem is how to access / import these datasets directly in my python program and then write back? Can anybody help. I have seen recommendation for python package "Sas7bdat" but not sure about it. ...
How to access SAS dataset (available both n local derive and SAS server) from Python code?
1.2
0
0
958
38,364,162
2016-07-14T01:31:00.000
2
0
1
0
python,function
38,364,393
4
false
0
0
One way is to have your required parameters be named like func(a, b, c=1) and this would denote required because the code will error out at runtime if missing any. Then for the optional parameters you would then use Python's args and kwargs. Of course anytime you use Python's args and kwargs means additional code to pu...
1
9
0
especially when there are so many parameters (10+ 20+). What are good ways of enforcing required/optional parameters to a function? What are some good books that deal with this kind of questions for python? (like effective c++ for c++) ** EDIT ** I think it's very unpractical to list def foo(self, arg1, arg2, arg3, ...
in python, how do you denote required parameters and optional parameters in code?
0.099668
0
0
19,827
38,364,568
2016-07-14T02:30:00.000
0
1
0
0
python,bdd,scenarios,python-behave
38,643,609
2
false
0
0
What I've been doing might give you an idea: In the before_all specify a list in the context (eg context.teardown_items =[]). Then in the various steps of various scenarios add to that list (accounts, orders or whatever) Then in the after_all I login as a superuser and clean everything up I specified in that list. Coul...
1
0
0
I am running multiple scenarios and would like to incorporate some sort of dynamic scenario dispatcher which would allow me to have specific steps to execute after a test is done based on the scenario executed. When I was using PHPUnit, I used to be able to subclass the TestCase class and add my own setup and teardown ...
Dynamic scenario dispatcher for Python Behave
0
0
0
697
38,365,948
2016-07-14T05:13:00.000
1
0
1
1
python-3.x,image-processing,anaconda,conda,ubuntu-16.04
48,430,119
4
false
0
0
You can try this conda install -c mlgill imutils
1
0
0
Hi, I am working in computer vision projects, I installed python 3.5 using anaconda in my laptop (Ubunut16.04 LTS). Can you please tell me, How I install imutils using conda in my ubuntu 16.04 LTS.??????
Install imutils using conda in Ubuntu 16.04 LTS
0.049958
0
0
3,202
38,367,206
2016-07-14T06:44:00.000
0
0
0
0
python,openerp
38,368,546
1
false
1
0
The difference is that in the python .py when you set a fields required argument to True, it's creates a NOT NULL constraint directly on the database, this means that no matter what happens (Provided data didn't already exist in the table) you can never insert data into that table without that field containing a value,...
1
0
0
What is the difference between giving required field in python file and xml file in openerp? In xml file :field name="employee_id" required="1" In python file: 'employee_id' : fields.char('Employee Name',required=True),
required field difference in python file and xml file
0
0
1
227
38,369,858
2016-07-14T09:00:00.000
0
0
1
0
python
38,370,024
5
false
0
0
You could do out = st.replace('Product=Product','Product') or out = st.replace('Product=Product',''). I tend to find that simple and readable.
1
1
0
I have string like: st= 'Product=Product Name 25' Want to lstrip. output desired: out= 'Product Name 25' For this i am doing like out = st.lstrip('Product=') Here I am getting as output as out= 'Name 25'.This is I don't want. As it is removing all occurence in my string but need to remove the first occurence. Desired ...
Python: Remove a word from string using lstrip
0
0
0
1,271
38,373,407
2016-07-14T11:48:00.000
0
0
0
0
python,google-app-engine,full-text-search
38,381,484
1
false
1
0
If you just say "no", you'll search all fields in the document. However, if you prefix your term with a field name like "field2:no" you will only search the values of that field.
1
0
0
In the search document I have two fields which have value as Yes or No. field1 - have value as Yes or No field2 - have value as Yes or No from function foo(), I want to search a document which have value as "no" and it should not search in field1. How to archive this ?
Appengine Search API: Exclude one document field from search
0
0
0
34
38,375,062
2016-07-14T13:04:00.000
0
0
0
0
python,scikit-learn,k-means
38,375,229
1
true
0
0
The way you're defining the orientation to us seems like you've got the right idea. If you use the farthest distance from the center as the denominator, then you'll get 0 as your minimum (cluster center) and 1 as your maximum (the farthest distance) and a linear distance in-between.
1
0
1
I've got some clustered classes, and a sample with a prediction. Now, i want to know the "orientation" of the sample, which varies from 0 to 1, where 0 - right in the class center, 1 - right on the class border(radius). I guess, it's going to be orientation=dist_from_center/class_radius So, I'm struggled to find class ...
Sample orientation in the class, clustered by k-means in Python
1.2
0
0
41
38,376,478
2016-07-14T14:08:00.000
5
0
0
0
python,tensorflow,conv-neural-network
38,376,532
6
false
0
0
sigmoid(tensor) * 255 should do it.
1
22
1
Sorry if I messed up the title, I didn't know how to phrase this. Anyways, I have a tensor of a set of values, but I want to make sure that every element in the tensor has a range from 0 - 255, (or 0 - 1 works too). However, I don't want to make all the values add up to 1 or 255 like softmax, I just want to down scale ...
Changing the scale of a tensor in tensorflow
0.16514
0
0
25,931