Using a Microsoft Kinect, I am collecting depth data about an object. From these data, I create a "cloud" of points (point cloud), which, when plotted, allow me to view the object that I scanned using …
I've to calculate the time-complexity of an algorithm, but in it I'm calling os.walk which I can't consider as a single operation but many.
The sources of os.walk left me confused as the filetree …
I get this error message when I try from tweepy import stream
ImportError: cannot import name stream
knowing that I installed tweepy on my python
So this is a really weird problem I've been getting. I'm basically trying to create a practice codebook which uses SIFT features of images that are clustered by the kmeans algorithm in Python. However …
I have some simple code and I just want to count the number of distinct columns in the product of two matrices. The code is
import numpy as np
n = 5
h = 2
M = np.random.randint(2, …
In my work as a grad student, I capture microscope images and use python to save them as raw tif's. I would like to add metadata such as the name of the microscope I am using, the magnification level, …
I have a website in which I want to upload images dynamically through python using a form. I have read other questions but none of them seem to be very straightforward/clear as to what I'm supposed to …
I want to be able to implement a condition in my program where it would only run for N number of hours, maybe the user could specify N, but let's not jump ahead.
I figured I could use datetime.now() …
Using Python I am currently trying to strip out part of a string that occurs between two characters. The string can be different lengths, so character counting will not work. An example of what I am …
I have two programs, S and D,written in Python 2.7, running on seperate machines, both linux.
The goal is to pass a file (in other words, bits) from S to D, through third party server called T only, …
Its working for 0032, 32, +32 but not as 0487365060 (which is a valid term)
to_user = "0032487365060"
# ^(?:\+|00)(\d+)$ Parse the 0032, 32, +32 & 0487365060
match = ...
I've decided not to waste my symmer and start learning python. I figured I'd start learning looping techniques so I wanted to start with a basic list of numbers, aka, write a for loop that will ...
Is it posible to use docstring for plain variable? For example I have module called t
l = lambda x: x
and I do
>>> import t
It seems impossible to use Panels and the 'Customize this page' feature with pages created by Entityforms such as the submit or the confirmation pages.
Is there a way to do this?
I am using the ...
How can I make an n by 2^n matrix of 0 and 1 values where all the columns are distinct? For example, if n = 2 that would be
And I can use itertools to make all possible tuples.
I have a string of the type:
"04/15/2013","A lot of text: numbers 123,412","3,123.99","-","1,123,123,99"
What would be a regular expression to parse it so that I get each of the comma separated ...
Is it possible to convert a selenium IDE test case (selense) to other programming languages by command line ?
for example, to python code.
emphasis on command line option and not using the Selenium …
I'm using TOR to proxy connections but am having difficulty proxying DNS lookups via socket.gethostbyname("www.yahoo.com") -- I learned that it was not sending DNS traffic via proxy by sniffing ...
We can give x and y axes labels for the main axes. Is there any way to similarly give a color bar a label? Alternately, is there any way to append a unit to one or more colorbar ticks?
I have some data that looks like this
What is the typical way to do a polynomial map of z based on x and y? I have used numpy.polyfit in the past to do similar things in 2 dimensions, so I suppose …
I have 4 python files. From PHP i run the first python file that call the others, but i got this error:
AccessInit: hash collision: 3 for both 1 and 1
What does it mean?
Here, talks about the …
I'm working at learning SQLAlchemy, and I'm having trouble doing seemingly simple operations. Please forgive me if my question is primitive and basic, but I cannot for the life of me figure out how to …
I have some cvs data that has an empty column at the end of each row. I would like to leave it out of the import or alternatively delete it after import. My cvs data's have a varying number of ...
I'm developing a maya scripted plugin that contains multiple nodes. For convenience I have split each node into a separate file like so
Please excuse this naive question of mine. I am trying to monitor memory usage of my python code, and have come across the promising memory_profiler package. I have a question about interpreting the …
I am continuously learning about both the AS/400 and IBM i Series as of late and unfortunately I have extremely limited assistance in this small business setting -- aka I am the IT department. The ...
I am trying to efficiently strip punctuation from a unicode string. With a regular string, using mystring.translate(None, string.punctuation) is clearly the fastest approach. However, this code breaks …
I am using Django framework for my backend support for a mobile app.
I choose to use the original Django's views.py to get my API url mapping and dump JSON for response, rather than using other REST …
I am using phue (a python library for interfacing with the Philips Hue API) and have a backend working with a web interface, however I would like to implement "scenes" (predefined light settings), ...
I've made a program that lets the the user create new vehicles with certain attributes. Now i need to create an inventory function that will add each vehicle created to a list of all the vehicles and …