Forum: Python Apr 2nd, 2009 |
| Replies: 33 Views: 2,114 I rewritten my rotation function and it works fine now...
I'm still working on this and I have a new question about my load method.
Say I have 2 different forms of csv files I want to load.... |
Forum: Python Mar 31st, 2009 |
| Replies: 4 Views: 1,225 Thanks for the help all...
I added the returnDelimiter functionality to my load method. Now it works fine. Somehow the csv files with comma's werent working for another function I have in the... |
Forum: Python Mar 27th, 2009 |
| Replies: 4 Views: 1,225 Hi guys,
I have a program where I need to load csv files. I have the problem where some loaded csv files have a comma as delimiter and other csv files have semicolon delimiters. For the... |
Forum: Python Mar 18th, 2009 |
| Replies: 1 Views: 360 Pfeeeew :)
I reworked on my loop and wrote everything out to finally come to the solution (i hope :P):
Print x, y for destination grid:
def rotate(self, n):
source = self
... |
Forum: Python Mar 18th, 2009 |
| Replies: 1 Views: 360 In a bigger program I made I need to be able to generate a grid with n rows and m columns. After that I need a function that will let me rotate this grid and with it rotate the values of the original... |
Forum: Python Mar 17th, 2009 |
| Replies: 33 Views: 2,114 Yes, I tried this but it won't work still.
Somewhere in all my code there's something wrong with how i define columns and rows, and as for someone with my coding experience this piece of code is... |
Forum: Python Mar 17th, 2009 |
| Replies: 33 Views: 2,114 to Gribouillis or someone else who wants to take a look:
my rotated function only works with square grids and not with grids with different height and width. I'm really stuck on this because... |
Forum: Python Mar 17th, 2009 |
| Replies: 33 Views: 2,114 Ok I understand, thanks :D |
Forum: Python Mar 17th, 2009 |
| Replies: 33 Views: 2,114 Oops found it,
I had to tell python from data_structure_6 import *
I thought when importing a file you could allready use all defined lists in this file but I guess I was wrong :P |
Forum: Python Mar 17th, 2009 |
| Replies: 33 Views: 2,114 Ok,
so in the meantime I've worked some more on this script and it's functionality. I now need to be able to use files from lists which I define in another script.
# example walking a... |
Forum: Python Mar 13th, 2009 |
| Replies: 3 Views: 539 First of all thanks for your post and your suggestions.
I'm gonna look more into it now.
PS. don't know what went wrong with posting the code. Normally my posted code looks fine :) |
Forum: Python Mar 12th, 2009 |
| Replies: 3 Views: 539 Hey there!
I've written a program and outside of that program I want to make a new python program which generates lists (or in some cases maybe dictionaries) from certain directories and the files... |
Forum: Python Feb 19th, 2009 |
| Replies: 2 Views: 999 Hi,
my question is how I can find the centroid of group of cells that share the same value. Say I have this:
grid = [[0, 0, 0, 0, 0],
[0, 1, 1, 1, 0],
[0, 1, 1, 0, 0],
[0, 1, 1, 1, 0],... |
Forum: Python Feb 4th, 2009 |
| Replies: 33 Views: 2,114 I've added a levenshtein function in my code to see if it comes up with some same results as my old compare method did.
It seems very much so and I think the results of both are 1:1 with... |
Forum: Python Feb 3rd, 2009 |
| Replies: 33 Views: 2,114 Hmm,
the method works when I code it like:
def printGrid(self):
for y in range(len(self.grid)):
for x in range(len(self.grid[0])):
print self.grid[x][y].value,
... |
Forum: Python Feb 3rd, 2009 |
| Replies: 33 Views: 2,114 Back from a few days of vacation. Yes this loop will work but when I want to print the cellvalues with the printGrid method it won't. It has to do with the __getitem__ method and it raises an... |
Forum: Python Jan 29th, 2009 |
| Replies: 33 Views: 2,114 Hi thanks, for the help, I'm not sure if i could have come up with that but as most of the times when i see the code I understand it.
Yes the printGrid isn't working perfectly I noticed this... |
Forum: Python Jan 28th, 2009 |
| Replies: 3 Views: 1,872 Sorry, you are right :)
the problem was the fact that the interpreter I use at home automatically worked with tabs and the vizard interpreter somehow had some stuff coded in spaces. In the vizard... |
Forum: Python Jan 28th, 2009 |
| Replies: 33 Views: 2,114 Ok I went back to my old code and classes and I wanna implement some comparing methods in this code. The goal is to test these different methods so I can see if all do a reasonable job of what I want... |
Forum: Python Jan 28th, 2009 |
| Replies: 3 Views: 1,872 Hello,
I'm writing my code into the 'vizard python editor' and sometimes it feels a bit bugged or something, now I get an error message that my class has no attribute.
I feel it has to do... |
Forum: Python Jan 22nd, 2009 |
| Replies: 33 Views: 2,114 I've 'overwritten' your code to get some feeling of what you plan to do.
I understand how you can input strings, and with the fromString() method make an array of these. The rotated() and... |
Forum: Python Jan 15th, 2009 |
| Replies: 33 Views: 2,114 I tried to explain my 'problem' or task in an earlier thread:
http://www.daniweb.com/forums/thread166744.html
but I didnt get alot of response there :) , maybe my explanation there wasn't quite... |
Forum: Python Jan 15th, 2009 |
| Replies: 33 Views: 2,114 Hello,
I'm further working on this concept where I compare cells of a template with cells of a target. The part where I need to rotate my template to see of this has a better match with the... |
Forum: Python Jan 14th, 2009 |
| Replies: 33 Views: 2,114 Thanks evstevemd, I will try it out a bit.
sneekula, what you do here:
"""
my transpose result -->
[0, 0, 0, 0, 0, 0] |
Forum: Python Jan 14th, 2009 |
| Replies: 33 Views: 2,114 Hey!
Thanks for your help :), I will look at it further.
What I do now is something like this:
template1 = [[0, 0, 0, 0, 0, 0],
[0, 1, 1, 1, 1, 0],
[0, 1, 1, 1,... |
Forum: Python Jan 14th, 2009 |
| Replies: 33 Views: 2,114 Hmm stupid me,
I must have made some small mistake in my loops why it went wrong.
I now have this code:
template = [0, 0, 1, 1, 0, 1, 0]
target = [0, 0, 0, 1, 1, 1, 0] |
Forum: Python Jan 14th, 2009 |
| Replies: 33 Views: 2,114 Hello all,
I have some difficulty with something I want to do:
I want to 'measure' the likeness of two lists of integers. What I mean is I want for example to compare:
list1 = [0, 0, 1, 1,... |
Forum: Python Jan 7th, 2009 |
| Replies: 0 Views: 789 Hello all,
I've written a piece of code that lets me generate or read a grid where all cells have a value. The grid stands for a simple 2d visualisation of an area where types of housing are to be... |
Forum: Python Oct 14th, 2008 |
| Replies: 8 Views: 821 Hey I fiddled around some more with my code. For the ease of use I made a new program to test the 3 classes: Grid, Cell and Cluster
I want to ask if my add method in the Cluster class and the... |
Forum: Python Oct 10th, 2008 |
| Replies: 8 Views: 821 Thanks for your reply...
but i'm afraid that for tonight I lost it here...can't seem to get it to work and it even gets more messy now. According my teacher the program was fine as I had it...I... |
Forum: Python Oct 10th, 2008 |
| Replies: 8 Views: 821 Hello, i did some adjustments to my old program and it's starting to get more and more functionality.
The floodFill operation works and I also added a clusterId which sets a new clusterId to each... |
Forum: Python Oct 3rd, 2008 |
| Replies: 8 Views: 821 Hi,
thanks for your reply. Since i'm just a beginner with Python coding I have the feeling I cannot fully understand your way in doing this. You can't point out a way that my old floodFill method... |
Forum: Python Oct 3rd, 2008 |
| Replies: 8 Views: 821 Hello all :)
I have a grid program that lets me define a grid and do some basic stuff with it. The next step I need to implement is that I need to add a floodFill like method... |
Forum: HTML and CSS Sep 25th, 2008 |
| Replies: 4 Views: 6,010 Thanks for your reply, but these things I allready knew so probably my explanation wasn't clear enough.
I use gradients that change color from top to bottom (too some height after that the... |
Forum: HTML and CSS Sep 25th, 2008 |
| Replies: 4 Views: 6,010 ok i just started some work on css and html and I designed a very basic website layout in Photoshop. In photoshop I made vertical slices so i can repeat these images horizontally for each div. I now... |
Forum: Python Sep 17th, 2008 |
| Replies: 6 Views: 1,342 Wow,
that's actually pretty good...and after watching your code it doesnt seem that hard...guess my inexperience with coding makes it hard for me to think off this stuff myself...
I also added... |
Forum: Python Sep 10th, 2008 |
| Replies: 6 Views: 1,342 Ok so I changed a bit more my code into this:
# Create a Python spatial grid.
from math import sqrt
class Grid(object):
"""Grid class with a width, height, length"""
def... |
Forum: Python Sep 3rd, 2008 |
| Replies: 6 Views: 1,342 Ok,
so i started this in another way because I don't need a gui and I need to write my own grid class:
As far as I am now I have this:
# Create a Python spatial grid.
class Grid(object): |
Forum: Python Aug 27th, 2008 |
| Replies: 6 Views: 1,342 Hello I'm new to the forums and I want to ask some questions about grid like operations:
Here I make a grid and set all cellvalues to 0.
import wx
import wx.grid
class... |