14,952 Topics

Member Avatar for
Member Avatar for James_41

I have to complete a project which have an text file and finds path between 2 actors(kevin bacin game) that you input by going through the movies in the text file. For example if the text file is: Apollo13 Kevin Bacon Tom Hanks Gary sinise HollowMan Elisabeth Shue Kevin Bacon …

Member Avatar for juanpa_2510
0
3K
Member Avatar for fontana74

Hi guys, I'm trying to draw multiple diagonal lines in python, I know I have to use a loop but how do I get the lines to draw in different places? i.e \\\\\ \\\\\

0
71
Member Avatar for prasanna.k

Hi Guys, I need python script to assign 100 IP addresses to VMs present in the same ESX host. can anyone help me with this.

Member Avatar for Gribouillis
0
768
Member Avatar for JJHT7439

I have to complete a lab which basically takes a text file and finds path between 2 actors that you input by going through the movies in the text file. (For the labs purposes we are only doing 3 degrees of separation) For example if the text file is: [QUOTE]Apollo13 …

Member Avatar for James_41
0
3K
Member Avatar for Noskes

Hi, I'm currently trying to create a Pattern on python which I'm really struggling to figure out. I'm trying to recreate the patch in the picture I've uploaded however I can't figure out where I'm going wrong. I'm really confused and I'd really appreciate it if someone could help me. …

0
75
Member Avatar for piovertwo

This is for a senior-year project with an [ANFIS](http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=256541) (adaptive neuro-fuzzy inference system) module to be used as a predictor for financial instruments. The bulk of the system will be written in Python—chosen for its ease of use and the presence of libraries for genetic programming, another component of the …

Member Avatar for Gribouillis
0
3K
Member Avatar for Alex_29

Hi, I've just started using Python/Pygame as a hobby. I've gotten the code to draw my Plane.png and move it using the wsad keys, and I mapped the q and e keys to rotate it which it does, but each time it rotates, it 'falls' down the screen to the …

Member Avatar for juanpa_2510
0
4K
Member Avatar for Karthika_g

Hello, Please let me know how should we get the id of an entity and put it in the another entity. I have two entity User and Track. I tried the below code I couldn't make. Please help! class Review(webapp2.RequestHandler): template = JE.get_template('templates/Review.html') self.response.out.write(template.render()) def post(self): n = self.request.get('user_name') t …

0
204
Member Avatar for Auroch

Hello! I'm trying to transform working Python code to Matlab code. It's Simpson's rule. But MatLab code is not working. What should I change for in this code? Python: from math import sin def f(x): return ((0.6369)*sin(sin(x))*sin(x)) def method_simpson_compost(f,a,b,n): h = (float(b)-a)/n i = 0 fks = 0.0 while i<=n: …

Member Avatar for Taywin
0
317
Member Avatar for Kadian

he following code gives the error UnboundLocalError: local variable 'currentpl' referenced before assignment: if user_choice == 0: currentpl = 1 elif user_choice == 1: currentpl = 2 while gameover(num_sq): if currentpl == 1: pick = getPlayerPick(num_sq) while not validPlay(pick, num_sq): pick = getPlayerPick(num_sq) makePlay(pick, player_col[currentpl]) if currentpl == 2: pick …

Member Avatar for snippsat
0
369
Member Avatar for photoguy77

teacher assigned out of the book "python programming: an introduction to computer science. second edition. page 384 # 19 is as follows this below is verbatim from the book and the instructions for the assignment are "Python Assignment #10 Complete programming exercise #19 on page 384 from Chapter 11" create …

Member Avatar for chriswelborn
0
366
Member Avatar for ncassambai

Hi so basically I need to create a timer for this simple maths test. I need it to give each question, lets say 30 seconds for test purposes, and then move onto the next question after the time is up and repeat the timer like that. Just cant figure it …

Member Avatar for woooee
0
141
Member Avatar for rogwar

Hi everyone. I have question and i hope someone will be pleased to help me. I am trying to write a python script which can extract data from a file (Iter.dat) and then put data in a tableau like the out.dat file. Here is what i wrote: f = open('Iter.dat', …

Member Avatar for rogwar
0
259
Member Avatar for sneekula

Draw a group of shapes on the Tkinter GUI toolkit canvas and animate the group using the common tag names.

1
5K
Member Avatar for mcroni

hi, have already written a GUI program on a different Pc, i copied the py file unto a new pc to continue with the building,i have installed all the necessary modules but it gives an error when i run it. Traceback (most recent call last): File "C:\Python34\aaaa.py", line 2, in …

Member Avatar for Gribouillis
0
336
Member Avatar for mark103

Hi all I have got a problem with the list of strings. I have got the full list of strings, but I can't be able to print for each string which I can only print for the full string. When I use this: programList = list() # set the channels …

Member Avatar for Gribouillis
0
269
Member Avatar for david.nicely.393

Need help with writing an algorithm: Department Store Sale! Prompt the user to enter the sticker price of each of the clothing items they’re purchasing (make sure all input prices are positive). The user should be allowed to purchase as many items as he or she would like. For each …

Member Avatar for sneekula
0
132
Member Avatar for Chtaylor5201

How do I change my inputs simple and compound with two decimals behind them? n = 5 rate = 0.05 for n in range(0, 3): principal = 10000 for n in range (0,6): principal <= 15000 simple = principal * (1 + rate * n) compound = principal * (1 …

Member Avatar for Gribouillis
0
116
Member Avatar for Diellza

I have wrote this code but it shows me only the timing not the values, can any bady tell me where is the problem? import time import random def procedure(): time.sleep(0.60) # measure process time t0 = time.clock() procedure() print time.clock() - t0, "seconds process time" #BUCKET SORT (up to …

Member Avatar for vegaseat
0
445
Member Avatar for cjohnweb

Hi there! I've googled around, and can't seem to find an answer to this question: How do you check if UART# has already been enabled or not? And what I mean is, I need to be able to get into python and say "If uart1 is not enabled, enable it". …

0
129
Member Avatar for mark103

Hi guys, I'm created the variables in the loops to generating the list of values and channels, I want to use the variable outside of the loop so I can get the list of values. I have a problem with get the list of values. When I try this: # …

Member Avatar for Gribouillis
0
205
Member Avatar for fatalaccidents

Hello all, I was curious as to how run many jobs serially on a Cray XE6 machine. You usually qsub things with a ccmrun (for a serial job) or an aprun (instead of mpirun or mpiexec). I first wanted to use the Pool() function, but due to it not being …

0
145
Member Avatar for Muhammad_69
Member Avatar for sneekula
0
110
Member Avatar for Diellza

have problem with understand how to resolve error in my code. Here it comes: def counting_sort(some_list, max=100000): licznik = [0] * (max+1) for x in some_list: licznik[x] = licznik[x]+1 i=0 for x in range(max+1): for y in range(licznik[x]): some_list[i]=x i=i+1 return some_list.reverse() def gen(number, b=100000): some_list = [] return [some_list.append(random.randint(0, …

Member Avatar for Diellza
0
233
Member Avatar for 4m1nh4j1

I am using python multiprocessing lib and I would like to reload a list of processes every x time. In other words, when the configuration is modified, all processes should read it again. def get_config(self): from ConfigParser import SafeConfigParser .. return argv def sched(self, args, event): #schedule instruction: schedule.every(0.01).minutes.do(self.worker,args) while …

Member Avatar for vegaseat
0
2K
Member Avatar for cjohnweb

At work I am taking on some development stuff on the beaglebone black and I have to learn Python. I've had a blast so far!! So I'm trying to understand what some of the code is doing. I have a sample script that opens a port and listens for connections …

Member Avatar for Gribouillis
0
1K
Member Avatar for Ed_3

I have a task to create a GUI program that is a logger. This means it needs to be able to show a leaderboard, allow users to add personal information in a form (lots of input boxes), and allow the users to view their personal info. im using wxPython and …

Member Avatar for vegaseat
0
174
Member Avatar for joustwilliams

Hello, this is my first post in this forum. I recently decided to try my hand at programming with python. I'm completely new to programming so I thought I should try some simple projects to reinforce what I've learned so far. I saw a post from 3 years ago on …

Member Avatar for vegaseat
0
2K
Member Avatar for alina.nazchowdhury

Dear, All Viewers I need your help guys I need to convert the python Asterisk Gateway Interface (AGI) PHP or Java or Perl Asterisk Gateway Interface (AGI), Please if anyone know about it help me ASAP, I wait for your feedback guys. Thanks here is Code... asterisk.py code is below: …

0
187
Member Avatar for valestrom

My program is supposed to replace all sets of 4 spaces with a tab but it only seems to be editing the first line then skipping the rest of the lines. "work_string" is defined via another function which takes and saves an entire files input into one string. I just …

Member Avatar for valestrom
0
314

The End.