text
stringlengths
226
34.5k
python read text from table scraping Question: I need a value from table with website My Python Code import sys import getopt import linecache import string import ftplib import os import requests from lxml import html import datetime page = requests.get(URL) tree...
TypeError: coercing to Unicode: need string or buffer, file found? Question: I am having problems with a very early prototype of a simple chat bot that will use the conversation that it is having to add to a database of responses that it can use later. import sys,time,random, os.path typing_sp...
Unable to automate git fetch && git checkout using python Question: I have automated the process of git checkout a particular branch which a user want to enter. I am using the following python code with subprocess to do so , from bitbucket.bitbucket import Bitbucket from sys import argv import su...
How to configure Sphinx auto flask to document flask-restful API? Question: I have a flask app that I want to use Sphinx's autoflask directive to document a flask-restful API. <https://pythonhosted.org/sphinxcontrib-httpdomain/#module- sphinxcontrib.autohttp.flask> I have installed the module via pip and run sphinx-q...
Sound output is present in sound input even with no mic in linux Question: I'm trying to simultaneously play a sound and record voltage output from a piezo sensor. For this, I connect my sound board analog outputs to speakers, and my sound board analog input to a piezo sensor. When I record signal from the sensor but ...
Trying to set a variable from a value in a dictionary Question: I'm learning python and am creating a rock paper scissors game. I'm stuck on one part. I have 4 variables currently (Although I would like to get it down to 2) * pKey * pChoice * comKey * comChoice They look up the the Key and Value respectivel...
Pandas Merge vs. Boolean Indexing Question: I'm using pandas in Python 3.4 to identify matches between two data frames. Matches are based on strict equality except for the last column, where close matches (+/- 5) are fine. One data frame contains many rows, and the second is just a single row in this case. The desired...
sFrame into scipy.sparse csr_matrix Question: I have a sframe like: x = sf.SFrame({'users': [{'123': 1.0, '122': 5}, {'134': 3.0, '123': 10}]}) I want to convert into scipy.sparse csr_matrix without invoking graphlab create, but only using sframe and Python. How to do it? Answer: Assuming yo...
Attempting to run multiple simulations of the Gillespie algorithm for a set of stochastic chemical reactions, in Python, in less than 10 minutes Question: I have written Python code that generates a plot. In the code below, when I set `maxtime = 0.1`, the program takes ~50s and when I set `maxtime = 1`, it takes ~420s....
Setting x axis label to bottom in openpyxl Question: The label on the x axis that is the years, I want to set the years to the bottom of the chart.[![enter image description here](http://i.stack.imgur.com/oxz6R.png)](http://i.stack.imgur.com/oxz6R.png) The data for the chart above is: >>> plot_data ...
Embedding Python within C++ (CPython API) Question: I'm trying to embed Python within my C++ project (Qt5). My project looks like this: python_test.pro: QT += core QT -= gui TARGET = python_test CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += main....
Java import statement not at the beginning of the file Question: In python, the import statement can be placed everywhere in the file, even inside a _class_ , or an _if_. Is there a way to accomplish the same thing in _Java_? I understand that it could be a bad practice not to put all the imports at the top of the fil...
How to have Pyramid invoke_subrequest to go through view_config context routing for error handling Question: We are using [`request.invoke_subrequest()`](http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/subrequest.html) to run a view from Python code. We would like the `subrequests` responses to go throug...
Python command line argument defaults Question: I just wondered if there was a simple way to set a python command-line argument using sys.argv as a default. For example; sys.argv[2] = "defaultValue" I know that in some other languages, you can do the following if it's blank; var myVa...
Reading table data (card images), with format specifier given, into Python Question: I am trying to read in a ascii-table into Numpy/Pandas/Astropy array/dataframe/table in Python. Each row in the table looks something like this: 329444.6949 0.0124 -6.0124 3 97.9459 15 32507 303 7 3 4 8...
I can't print from Python IDLE in Windows 10 Question: Since upgrading to Windows 10 I can no longer print from the IDLE Python IDE. The "print to default printer" box comes up as usual, but nothing is sent to the print queue ... I checked in Devices & Printers. Printing from other applications works fine. Answer: I...
Replacing masked values (--) with a Null or None value using fiil_value from ma numpy in Python Question: Is there a way to replace a masked value in a numpy masked array as a null or None value? This is what I have tried but does not work. for stars in range(length_masterlist_final): .... ...
How can I get the data from the CSV file and declare a variable for each column using python? Question: I have a csv file that might look like this (contents variable-format not): "Red","House","1/1/2010","Green Eggs and Ham",1,10 The csv file that will always have just one row of data and 6 columns How can I get th...
Python create excel readable csv from list of float values in single column Question: I would like to be able to create a csv file from a list of floating point values in a single column. Not sure how to achieve this... mylist = [1.11, 2.22, 3.33, 4.44, ...] with open('myfile.csv', "wb") as file: ...
There is a way to change wpf components in another thread with ironpython 2.7? Question: So, I'm trying to make some function run without freezing the GUI. There is some way to change the text from a textblock in another thread? For example: import wpf import thread from System.Windows impor...
Unable to make a http get request to SO Question: I have a piece of code in python that can make http get requests. I can successfully make request to URL like <http://google.com> and download their page. But I can't make a get request to <http://stackoverflow.com> . It shows HTTP 403 forbidden ERROR. However I can acc...
How to modify a tag text value based on its sibling tag text value in xml with python? Question: For Eg: <parameterDefinitions> <hudson.model.StringParameterDefinition> <name>name</name> <description></description> <defaultValue>abc</defaultValue> ...
Python histograms: Manually normalising counts and re-plotting as histogram Question: I tried searching for something similar, and the closest thing I could find was [this](http://stackoverflow.com/questions/17966093/is-there-a-way-to- return-same-length-arrays-in-numpy-hist) which helped me to extract and manipulate t...
line interpolation on grid with python3 Question: I am very new to python(say 1 week) and numpy/scipy but not new to programming at all but wondering how to do the following correctly (preferably with numpy/scipy): So say I have an 150x200 ndarray with float values. I want to interpolate a line from 20:40 to 100:150 w...
Python - order dictionary data Question: My knowledge about Python is really low. I am trying to order data from a dictionary and I do not know how. I have tried OrderedDict, Sort and variable.sorted but I only got errors. What I have tried: textos_informativos = [] for t in c.producto.textos: ...
Installing numpy with pypy on mac osx Question: I'm unable to install numpy with pypy on mac. I have installed pypy using brew and when I try to execute: pip_pypy install numpy I get this error: creating build/temp.macosx-10.11-x86_64-2.7/private/var/folders/9p/_t441dx15ddcx5y...
Efficiently save to disk (heterogeneous) graph of lists, tuples, and NumPy arrays Question: I am regularly dealing with large amounts of data (order of several GB), which are stored in memory in NumPy arrays. Often, I will be dealing with nested lists/tuples of such NumPy arrays. How should I store these to disk? I wan...
Why apache throws Target WSGI script not found or unable to stat on Flask app? Question: I want to setup my flask app for apache on my ubuntu server using wsgi. But after my setup, I get the following browser error: Not Found The requested URL / was not found on this server. The apache error lo...
Chr() arg not in range python Question: I have been creating a program, and part of it involves modifying a list of characters at random: while rel>0: pos = random.randint(0,len(out)-1) change = random.randint(-1*rel,rel) if (change+ord(out[pos]))>=255: ...
SQLAlchemy InvalidRequestError: failed to locate name happens only on gunicorn Question: Okay, so I have the following. In `user/models.py`: class User(UserMixin, SurrogatePK, Model): __tablename__ = 'users' id = Column(db.Integer, primary_key=True, index=True) username = Column(d...
bzt 1.1.0 says DistributionNotFound: selenium Question: I just installed bzt 1.1.0 on my MacOSX but it won't run, it gives this message: Traceback (most recent call last): File "/usr/local/bin/bzt", line 5, in <module> from pkg_resources import load_entry_point File "/System/Library/F...
Create unique ID from the existing two columns, python Question: My question is: how to efficiently sign data unique id numbers from existing id columns? For example: I have two columns [household_id], and [person_no]. I try to make a new column, the query would be: household_id + '_' + person_no. here is a sample: ...
Building a CSV file to import into sql, how to handle relationships? Question: I have a very large set of data where each row in table A point to a lot of rows in table B. In generating a CSV file, I would need to somehow show this relation, but I don't have an integer based pkey. Each of the items in A have a unique u...
phyton3 pip and pyautogui install mac -remove broken python Question: having jumped into java development a year ago, i now struggle myself thru terminal commands and try to get the red line in it. I now want to set up python3 and pyautogui following this tutorial: <https://automatetheboringstuff.com/chapter18/> unfo...
Python: Download multiple .gz files from single URL Question: I am having trouble downloading multiple network files from an online directory. I am using a virtual Linux environment (Lubuntu) over VMware. My aim is to access a subfolder and download all the .gz files it contains into a new local directory that is diffe...
Ctypes Text Input Box Help Using Python Question: How to make a popup window with an text input box in Ctypes using python 3 or using MessageBoxW,if possible? Answer: It works! import ctypes MessageBox = ctypes.windll.user32.MessageBoxW MessageBox(None, 'Hello', 'Window title', 0)
Django - Did you forget to register or load this tag? Question: I've created a custom tag that I want to use, but Django can't seem to find it. My `templatetags` directory is set up like this: [![](http://i.stack.imgur.com/FMI2O.png)](http://i.stack.imgur.com/FMI2O.png) **pygmentize.py** from pygments ...
How do I send connection objects using Pipe() in python? Question: I am not able to send pipe objects between processes. pipe_i.send(diff_connection_object) I know connection objects are not pickalable. As send() only takes as argument picklable objects thus I am not able to send the connection obj...
How to judge bmp pictures from clipboard whether they are same using wxpython? Question: Function that I want to realize: when the bmp picture get from clipboard is changed, refresh window. If not, nothing will be done. Question that I meet: every time my program goes into function UpdateMsgShownArea(), self.oldBmp wi...
HUE on AWS : Hive Editor needs HiveServer2 - Error creating table sample_07 Question: I deployed a Cloudera EDH cluster on AWS using Quickstart and the cloudera- director executable. I followed the instructions in here : <http://docs.aws.amazon.com/quickstart/latest/cloudera/welcome.html> and I used the aws.reference.c...
Pydev setup not recognizing undefined value Question: I have PyDev setup in eclipse.I think I did everything to configure my workspace to show python files in PyDev perspective. It still does not show the files in Python format. Steps tried * installed PyDev in eclipse, * Configured PythonPATH * Associated file...
Error importing python-igraph Question: I'm trying to install python-igraph package. Installation works without any warning nor error, but then, when I try to import the module, I get an error: In [1]: import igraph --------------------------------------------------------------------------- Impor...
How to import a module from the root dir having another with same name in a descendent package? Question: I'm using python 2.7.10. I understand that there is many questions related to this. I'm starting this question because none of answers I found in StackOverflow answers my doubts. My goal here is to clarify my unde...
Getting VS2015 to work with arcpy Question: I am taking a course on programming ESRI's ArcGIS using Python. Although the course content shows us how to work with various IDE's, I would like to do my homework in Visual Studio 2015 (Community Edition). But I am having trouble getting it to work on my laptop and would lik...
How to set a secondary y-axis in Python Question: I'm currently trying to change the secondary y-axis values in a matplot graph to `ymin = -1` and `ymax = 2`. I can't find anything on how to change the values though. I am using the `secondary_y = True` argument in `.plot()`, so I am not sure if changing the secondary y...
Python: Count uniq line(s) between 2 files Question: First File | Second File bob | greg bob | larry mark | mark larry | bruce tom | tom With the code bellow I get output: **bob** , but I need to get **bob x 2** with...
Down sampling in pandas and spline interpolation Question: I am working with a hourly time series data in datetime format on x-axis and pressure on y-axis. I want to downsample the data to 3-minute intervals and then do a spline interpolation on the y-axis data. I don't know how and if ipython notebook (pandas or nump...
python how to loop through csv several times from top? Question: I have a csv file (yy.csv) that looks like this: term,country,score,week aa,USA,26.17,11/22/15-11/28/15 bb,USA,16.5,11/15/15-11/21/15 cc,UK,31.36,11/22/15-11/28/15 dd,UK,21.24,11/15/15-11/21/15 ee,FR,19.2,11/22/15-11/28/...
Long elif chains vs dictionary with exec() Question: I am a novice to python and I have read a lot of tutorials on how to properly code. One thing that keep popping up is to never write the same line of code multiple times. I am unsure if long elif arguments count for that, but to me it just looks like bad code. for e...
How can I open a docx file, find a particular string occurring at multiple places and add two lines after that in the whole document using python? Question: As I am new to the python programming, I want to open a .docx file, parse it, find occurrence of particular string in multiple places and then adding two lines aft...
Softlayer Python API:multiple local properties of billing item are not returned Question: Calling the billing_Item Python API, a billing_item is returned BUT a lot of (interesting) local properties are not returned. The local properties of my interest all have to do with uptime and fees (e.g. laborFee, oneTimeFee, hour...
Using a loop to make a dictionary Question: I'm trying to make a binary2acii and vise versa `Dictonary` via Python shell. I'm a bit stuck: 1. I make a new `Dictonary` 2. I need to declare, that it goes from 0-127 3. Make a loop to go through all options I'm new to this. binary2ascii = {}, fo...
Python pandas plot time-series with gap Question: I am trying to plot a pandas DataFrame with TimeStamp indizes that has a time gap in its indizes. Using pandas.plot() results in linear interpolation between the last TimeStamp of the former segment and the first TimeStamp of the next. I do not want linear interpolation...
Python: How to compute the top X most frequently used words in an NLTK corpus? Question: I'm unsure if I've understood correctly how the FreqDist functions works on Python. As I am following a tutorial, I am led to believe that the following code constructs a frequency distribution for a given list of words and calcula...
AppRegistryNotReady: Apps aren't loaded yet. Django Question: I'm trying to run django 1.9 on google app engine. Got the below error when trying to access API's through Google API Explorer. Traceback (most recent call last): File "/home/gemini/softwares/google_appengine/google/appengine/runtime/wsg...
How to make googlemaps python library detect SSL certificates? Question: **The problem** Make to work: import googlemaps gmaps = googlemaps.Client(key='AIza...') # Geocoding an address geocode_result = gmaps.geocode('1600 Amphitheatre Parkway, Mountain View, CA') **Tried so...
Python regular expression simple OR condition doesn't work? Question: I am trying to write a simple regular expression in Python that recognizes either a comma or a newline, to be used as a delimiter and split() text. I have tried the following: delim = r'[,\n]' delim = r'[\n,]' delim = r',|\n' ...
Python-ONVIF PTZ control -- Absolute and Relative Move Question: I am developing an application in Python to control ONVIF-compatible cameras. Software: Debian Wheezy, Python 2.7, Quatanium python-onvif client Hardware: Raspberry Pi 2 B, IP camera on local router, wifi/VNC for development The required PTZ functions ...
Connect to dynamic database parameters sqlalchemy Question: I am using sqlalchemy to connect to my database for my python API like so: app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://username:password@localhost/dbname' My problem is that other developers in this project have different database use...
Attempting to extract text that is within tags <*word word word*> n times in each line via Python Question: text = 'the text stuff <*to test*> to find a way to extract all text'\ 'that is <*included in special tags*> less than star and greater'\ 'than star' I've tried using: [Adding ...
Python Tools for Visual Studio Inline Graphics Question: This one should be simple, but I've been searching all over and it seems to be so simple that nobody else has encountered the problem yet :) I just installed Python (2.7 Anaconda distribution) and Python Tools for Visual Studio with Visual Studio 2015 Community....
Failed with pip install chompack Question: I'm trying to install chompack with pip to use in a Support Vector Machine algorithm with cvxopt. However it gives me an error for which I haven't found a clear answer. There is a [related question](http://stackoverflow.com/q/12511815/2297475) but the answer provided is very s...
Change spacing of dashes in dashed line in matplotlib Question: In Python, using matplotlib, is there a way to change the distance of the dashes for different linestyles, for example, using the following command: plt.plot(x,y,linestyle='--') Answer: You can directly specify the dashes length/space...
Error with the command onkey() Question: I'm trying to create a shooter-like game in Python turtle (it's basically a copy of the game `Boom dots`). But I'm having a lot of issues, because I'm kind of new to programming. This time the command onkey() doesn't work. I tried everything but nothing seems to be of help. I do...
Fortran version of python loop giving incorrect answer Question: I've been working on an international trade model and the model has gotten really slow (sometimes taking weeks at a time to finish). Mostly, there was a big for loop that was slowing the process down, as shown here (in Python): for s in xra...
Recover from sudo rm -R /System/Library/Frameworks/Python.framework/Versions/2.7 Question: I was following this [tutorial](https://wolfpaulus.com/journal/mac/installing_python_osx/) for removing older versions/symlinks of Python, so I could use python 3.5, and have it be my default version The command: > sudo rm -R /...
create a symmetric matrix from a pairwise list python for clustering scikit, DBSCAN Question: My goal is to perform clustering using DBSCAN from scikit with a precomputed similarity matrix. I have a list with features. I do a pairwise to generate unique pairs for the list and have a function that calculates similarity ...
Python 3 - Upload PIL Binary to FTP server Question: im new to python and i try to upload a image to FTP in python 3. I'm taking the pic with the raspberry camera modul and write it to a binary. After this i do some actions with PIL. This part works already fine. I also can store it to a JPEG file. I wanna skip the fi...
Error with npm install opencv Question: When running "npm install opencv" this is what I get > if not defined npm_config_node_gyp (node "C:\Users\Shaun\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\. .\node_modules\node-gyp\bin\node-gyp.js" configure --fallback-to-build --module=C:\Us...
How to graph nodes on a grid in networkx Question: Just started learning Network Science and I'm a novice in Python so I've been having a hard time figuring this out even after reading a good bit of the networkx documentation. I need to compare the distance between all the nodes and generate an edge in the event the di...
Elasticsearch very unreliable in returning results with NGINX and UWSGI Question: **Summary** : _I have a website with a search-as-you type search through Flask and Elasticsearch. This works perfectly on my local machine, and on my server (a Vultr droplet) when I run flask directly. However, when I run the website thro...
ImportError: cannot import name inspect OpenShift Question: Trying to deploy my application on OpenShift I'm stuck with this error: Traceback (most recent call last): File "app.py", line 35, in <module> application = imp.load_source('app', 'flaskapp.py') File "flaskapp.py", line 2, in...
PTVS 2015 Numpy Install Question: I am attempting to use the dialog box to install numpy in a VS2015 Python 2.7 project like so: [![enter image description here](http://i.stack.imgur.com/MXg6z.png)](http://i.stack.imgur.com/MXg6z.png) When I run it, I get the following message: You are using pip versio...
Failing to print query using Overpass API with Python Question: This is my code so far, I am using the flickrapi to obtain images with lat and lon, then using the overpass api in flickr to find info about the nodes at this location. import flickrapi import overpy api_key = "xxxxxxxxxxxxxxxxx...
Reading Text File From Webpage by Python3 Question: import re import urllib hand=urllib.request.urlopen("http://www.pythonlearn.com/code/mbox-short.txt") qq=hand.read().decode('utf-8') numlist=[] for line in qq: line.rstrip() stuff=re.findall("^X-DSPAM-Confidence: ([0-9.]+)",li...
Python 3 Get and parse JSON API Question: How would I parse a json api response with python? I currently have this: import urllib.request import json url = 'https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty' def response(url): with urllib.request.urlopen(url...
python list.pop() modifies original list (not just copy) Question: Situation: After making a copy of the original list I use pop to modify said copy. As it turns out, the original list gets affected by the change. I even after checking the original list and the copy are not the same object, poping an element of the co...
Open .dat and .atr file types with Python Question: I'm trying to read in .dat and .atr files with Python; from Physionet, [these for example](https://www.physionet.org/physiobank/database/mitdb/). I've tried the standard context manager opening method: with open("path/to/files/101.dat", "rb") as f: ...
Properly using Foreign Key references in search_fields, Django admin Question: I've got a weird conundrum that I need some help with in Django 1.8.4 using python 3.4 in a virtual-env. I've got 2 models in 2 different apps... as follows with multiple Foreign Key references. **Inventory App** class Inven...
How to I check that a string contains only digits and / in python? Question: I am trying to check that a string contains only / and digits, to use as a form of validation, however I cannot find and way to do both. ATM I have this: if Variable.isdigit() == False: This works for the digits but I have...
Failing hard at OOP in python Question: This represents a simple class, that I have made to try and practice OOP. import csv import logging class LoaderCSV: def __init__(self, file): self.file = file if file is None: logging.warn...
Is there a way to write a pandas SQL query across multiple lines with comments? Question: When writing a regular expression, it is possible to write the expression across multiple lines and including annotation, then compile the expression using the `re.VERBOSE` option before passing the compiled version. I'd like to d...
Regex between quotes look ahead - Python Question: I have this: myText = str(^123"I like to"^456&U"play video games and"$"eat cereal") I want to extract everything in between (and including) quotation marks, split everything before and after the `$` sign, and append them into a nested list. E.g. m...
Python 2.7 cannot find module when running py. But can find module in terminal Question: OSX, PyCharm, with brew-installed python 2.7, simply trying to import from azure.mgmt.common import SubscriptionCloudCredentials import azure.mgmt.compute import azure.mgmt.network import azure.mgmt.resou...
Access next sibling <li> element with BeautifulSoup Question: I am completely new to web parsing with Python/BeautifulSoup. I have an HTML that has (part of) the code as follows: <div id="pages"> <ul> <li class="active"><a href="example.com">Example</a></li> <li><a href="e...
Working with "unclean" text in python Question: Please forgive my ignorance I am new at this. I have searched for this and tried several of the examples, but I think I am finding most things that might work in python2.7 but I am required to use python3.5 for work. I am trying to extract just the cities from this list o...
how to start and run downloaded python web application that has many files on linux (virtualbox) Question: i have downloaded a open source python web app(for link click [here](https://github.com/mustafatasdemir/apkinspector)) on github and i do all of its steps .its apkinspector web application i got confused . how ca...
Alternatives to Selenium/Webdriver for filling in fields when scraping headlessly with Python? Question: With Python 2.7 I'm scraping with **urllib2** and when some Xpath is needed, **lxml** as well. It's **_fast_** , and because I rarely have to navigate around the sites, this combination works well. On occasion thoug...
Python - How to special sort list Question: can anyone advise me how to sort the array by column 'age'? student = { 0 : {'name' : 'jane', 'age' : 40}, 1 : {'name' : 'pool', 'age' : 11}, 2 : {'name' : 'dave', 'age' : 28} } print(student[0]) print(student[1]) ...
Python Matplotlib Twinx() cursor values Question: I want to use the cursor (x,y values get displayed at the bottom left of figure) to measure the y and x distance between two points, however this only works for the data plotted on the second axis. Is there a way to switch back an forth between the second axis and firs...
What's wrong with this if elif else code in python? Question: I'm making a simple Rock, Paper, Scissor game. As you can see in the code snippet, the program asks the user if they want to play best out of 3 or 5. If the input is `'five', '5'` or `'cinco'` the function `best_out_of_five()` executes (which prints `'55555...
Python issue when returning function from another file Question: I'm having a bit of an issue when trying to return a function from another file. main.py: from master_input import load_input class Vera(object): def __init__(self): masterinput = load_input() self....
Data Frame in Python Question: I am trying to download Apple's stock price in Python. I noticed that the data however wasn't in a data frame. It was jumbled when I viewed it in my Spyder IDE. How do I turn coerce it into a data frame/matrix format and how do I reference data columns such as "Volume" "Adjusted Close"? I...
targeting one word in the response of an input command python Question: I have been trying to make an artificial intelligence on python. What I have been trying to do is make input command responses target one word. So for example, if the user types in "whats your name" it will have the same response as "name" by targe...
How to assign settings base on testing and production env in flask? Question: I would like to assign different settings base on various condition such as testing and production. Therefore I want `create_app` accept an argument indicating settings and make `create_app` load different settings as follows. app.py ...
Using Django Rest Framework as security layer for file system processing Question: I'm trying to protect my remote server file system from unauthorized users. I have a remote storage on a different server that store and process PDF's and PNG's from all kind of processes. I'm using Python 2.7 with Django 1.8 and Django...
'TypeError' while using NSGA2 to solve Multi-objective prob. from pyopt-sparse in OpenMDAO 1.x Question: I am trying to solve a multi-objective optimization problem using openMDAO's pyopt-sparse driver with NSGA2 algorithm. Following is the code: from __future__ import print_function from openmdao.ap...
How to draw bar chart using Plotly Offline mod in python? Question: I have some features and values like food 3.4 service 4.2 environment 4.3 and i want to draw a bar chart using plotLy offline mode (not registering and authentication ). so far i have the code for drawing a scaterred line using offline mode of pl...
python __init__.py proved to be irrelevant in 3.4? Question: I am running python 3.4 on the main.py file in the same directory. /root directory is not in python path. It is simply the current directory that the script is executing in. All pycache folders were deleted after each test So why exactly is init.py important...
image segmentation using kmeans clustering python opencv Question: I've been trying to achieve similar results to this [MATLAB code](http://www.mathworks.com/help/images/examples/color-based-segmentation- using-k-means-clustering.html) which gives me the result I am looking for, however, I am trying to achieve that usi...