Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
~10.5K People Reached
Favorite Forums
Favorite Tags

19 Posted Topics

Member Avatar for breatheasier

Hi, I'm wanting my program to loop and create different files outputting at different stages in a while loop, I just can't work out how to make it happen! here's a stupid example [code=python] while (a<10): a = a+1 if (a=4) or (a=6): output = open('output'+a, 'w') #something like this? …

Member Avatar for xopenex
0
5K
Member Avatar for breatheasier

Hi, I was wondering what libraries there are out there to do some simple sound generation. For example sine waves, square waves etc.. I'm on Linux, so no Microsoft stuff please.

Member Avatar for jbennet
0
165
Member Avatar for breatheasier

Hi, I want to create a program that will synchronise a folder on my laptop(running OS X) and a folder on a remote server(running Linux). For example, the program is contained in a subfolder on my laptop, when I run it, it ssh's to the remote folder and loops through …

Member Avatar for cfajohnson
0
85
Member Avatar for nflem

a simpler way, without having to convert i to a string could be: [code=python] name='harry' name2='verderchi' nt=8 #number of times to print for i in range(1,nt+1): print '#%s:%s %s'%(i, name, name2) [/code] the %s is a placeholder for the variables inside the brackets.

Member Avatar for vegaseat
0
91
Member Avatar for breatheasier

Hi, I've got some c++ code(which i don't have much experience in). I'm trying to write the same code again in python but i'm not having much luck. The c++ code creates an array of x,y co-ordinates: [code=c++] for (double ix = 0; ix < nlat; ix++) { for (double …

Member Avatar for vegaseat
0
266
Member Avatar for skhan23

1.Try writing it out on a peice of paper. The first question is easy if you run through what number you would need. 2.any python book will tell you what != means, and 'if not' is self explanatory. 3. will take some thinking about, but after you get the hang …

Member Avatar for adam1122
0
101
Member Avatar for breatheasier

Hi, I have 2 columns of data, separated by a space, which I am trying to import into 2 variables as a tuple. Each column as a variable. I know the program would involve something using line.split() or line.strip() but I can't figure out how I would do it. Also …

Member Avatar for breatheasier
0
179
Member Avatar for breatheasier

Hi, I have been writing a program that simulates the behaviour of a system of hard disks using the monte carlo method. I ran the program upto around 2 million steps and it's really slow(takes around 3 1/2 to 4 hours). I first wrote it in vpython as I'm a …

Member Avatar for breatheasier
0
264
Member Avatar for MaxManus

How are you wanting to arrange your x and y values? What you have done is correct if you want to create a list of x's and a list of y's whos values are 1 greater than the corresponding x. Ah I think you want to do it in M-code. …

Member Avatar for MaxManus
0
173
Member Avatar for breatheasier

Hi. I've read the documentation but I can't quite work out how i create an object and give it attributes. I'm trying to create a disk object that has attributes disk.x and disk.y which i can then identify with a line, [code=python] disk.id = (x,y) [/code]

Member Avatar for breatheasier
0
92
Member Avatar for Norbert X

What particular part of it are you having trouble with? You cant just post your entire assignment.

Member Avatar for jlm699
0
149
Member Avatar for breatheasier

Hi I'm wondering how I would go about creating a program that will input data from about 1,000 files containing data such as this: [code] 2.825 1.00697992588 2.875 0.952989176901 2.925 0.91428970229 2.975 0.890110513425 3.025 0.879731596138 3.075 0.959217137445 3.125 1.07391392796 3.175 1.04874407027 3.225 0.857693793906 [/code] I'm wanting to generate an average …

Member Avatar for Gribouillis
0
152
Member Avatar for scru

What's the project? The strength of python is its portability. Edit:Just clicked the link, Ignore my post.

Member Avatar for leegeorg07
0
156
Member Avatar for breatheasier

Hi, I'm trying to print two arrays to a file, these are pretty large. However I want to print them as two lists. This is an example of what my output is now: [ 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. …

Member Avatar for breatheasier
0
163
Member Avatar for breatheasier

Is there an easy way of doing this? for example my list is: [code=python] nlat=10 mylist = [] for x in range(0,nlat): for y in range(0,nlat): disk=sphere(pos=(x*s,y*s), radius = r, color=(0,1,9)) mylist.append(disk) [/code] or is it impossible to place objects, such as a sphere from vpython into a numpy array?, …

Member Avatar for breatheasier
0
687
Member Avatar for breatheasier

Hi, I'm making a program in VPython to simulate the motion of particles. It's fairly simple in theory but I'm having some problems with my lists of particles. What I'm trying to do is make sure that the particles do not overlap, and regenerate a position if they do overlap. …

Member Avatar for BearofNH
0
157
Member Avatar for beanryu

If you are using windows, I would recommend notepad++ You can set the language so it will highlight your code for you. I believe you can also set it to run the script immediately from the editor without too many headaches: [url]http://users.cse.ucdavis.edu/~cmg/courses/nlp/Software/Windows/npp.html[/url]

Member Avatar for breatheasier
0
2K
Member Avatar for Ene Uran
Member Avatar for breatheasier
0
146
Member Avatar for breatheasier

Hi, I'm trying to create a 2-Dimensional box in vpython and fill it with circles placed in random positions but the circles cannot overlap. This is how far I have got, but I can't work out how to make the positions not overlap. I'm sure most of what I've done …

Member Avatar for Stefano Mtangoo
0
99

The End.