15,181 Topics

Member Avatar for
Member Avatar for fatalaccidents

I was wanting to create something very specific that I have yet to run into yet googling the topic. I want to create a radviz graph with many parameters, which is well documented. I'll give you an example that might help clarify what I'm trying to do. So here are …

0
116
Member Avatar for vulcano224

HI Guys, I am trying to Create a GUI in Python that calculate the average of three numbers. I am having some issues tring to create the three boxes where the user should enter the numbers, so can anybody please give me a hand? Thank you so much!!!!

Member Avatar for minyechil
0
418
Member Avatar for racigan

array = [10.4 , 10.4,10.4 ,10.4,11.0] Need to find the all the values in array are equal, if values are not equal get the first non equal value. expected: false for the above example. get the value 11.0

Member Avatar for 1nfinite
0
206
Member Avatar for davidbr

I have this code which if i press msgbox yes it opens another frame but if i do same thing from another function (counter) i get an error. Can someone help me and tell what is wrong? import tkMessageBox import Tkinter as tk from Tkinter import * from functools import …

Member Avatar for sepp2k
0
218
Member Avatar for Teeban Jay

This is a program that will calculate stockin expenses and other but the problem is whatever value i entered in the cement, bricks and etc(line 120-line155) part it keeps on showing zero import Tkinter Total_StockIn = 0 Total_Expenses = 0 def win1(): global root global s # this is the …

Member Avatar for vegaseat
0
222
Member Avatar for Tcll

so I was trying to think of ways to reduce python's memory usage when you write your code. my logic is telling me your class instances will use less memory if you write your class functions before writing your class: def classfunc( inst, arg ): pass class mainclass: pass inst …

Member Avatar for Tcll
0
228
Member Avatar for kouty

Hi my friends! Here is a wrong code, Wrong and I don't know why. My purpose is to make a **sieve of Erasthotene**. I make an unique function with many inner loops. But the execution **don't go cross the lines** I illustrate this with the help of printing the different …

0
201
Member Avatar for deonis

Hi Guys, I am trying to draw on PlotCanvas using wx.DC module. I have several problems with drawing on WXBufferedPaintDC, for some reason my DC text disappears after windows resizing and it looks that I draw my text in the wrong place. Any help appreciated. Here is my code: import …

Member Avatar for deonis
0
1K
Member Avatar for dadaas

Hi, i m new and i will sure seek for some help also i will try to help others as well with my for now limited knowledge of Python. So here is my problem: I m learnign and i want to learn how to scrape things. i did scrape some …

Member Avatar for dadaas
0
245
Member Avatar for johndumb77

Hey guys, I have this code at the end of my python game: root = Tk() root.title("Jack's Game") root.resizable(0,0) root.configure(bg="green") game = Board(root, width=8, height=8, letters=10) game.mainloop() And I also have a button somewhere above. I want to have function for the `command="xxx"`. What I want the function to do …

0
100
Member Avatar for mark103

I need some help with my code, I'm stored the list of elements in arrays and when I try to print the list of elements, it would print only one element where I have more than one. When I try this: pos_start = list() pos_top = list() pos_width = list() …

Member Avatar for woooee
0
279
Member Avatar for bunkus

Is there anybody having a code snippet for using the Bresenham circle algo and modifiying it in a way so that it actually draws arcs with specified start and end angle instead of complete circles? A Bresenham algo for a complete circle in Python would be like this: [CODE]import PIL.Image, …

Member Avatar for vegaseat
0
8K
Member Avatar for vegaseat

Just some interesting applications of the bitwise and (&), or (|) operators. You might find some other uses.

Member Avatar for vegaseat
0
278
Member Avatar for Raman_4

In the below python code, scrollbar for the panel is not working. I have added checkboxes under panel in the 2D for loop. Please help here def GenerateTree(self,event): v1=int(val1) v2=int(val2) print v1,v2 x=v1+v2 print x panel = wx.lib.scrolledpanel.ScrolledPanel(self,-1, size=(1100,1500), style=wx.RAISED_BORDER,pos=(10,145)) panel.SetupScrolling() UEarr=('UE1','UE2','UE3','UE4','UE5','UE6','UE7','UE8','UE9','UE10','UE11','UE12') LCarr=('LC3','LC4','LC5','LC6','LC7','LC8','LC9','LC10') y=0 i=0 j=0 k=0 for i in …

Member Avatar for vegaseat
0
239
Member Avatar for jeremywduncan

Exercise 11.1. Write a function that reads the words in words.txt and stores them as keys in a dictionary. It doesn’t matter what the values are. Then you can use the in operator as a fast way to check whether a string is in the dictionary. Trying to figure this …

Member Avatar for Mohammad_19
0
3K
Member Avatar for lapo3399

I'm new to Python, and as I was coding for Project Euler to develop my skills in this language, I needed a function for converting between two bases. I know that int() can convert anything to base 10, but before I looked for a Python module concerning this math, I …

Member Avatar for vegaseat
0
2K
Member Avatar for tony75

Hi I have this key How can I add \x between two number of hex as you see in my example. f0cbf260e0ca8ec2431089fb393a1c29513aaaa5847d13e8be84760968e64dc6 Change to “\xf0\xcb\xf2\x60\xe0\xca\x8e\xc2\x43\x10\x89\xfb\x39\x3a\x1c\x29\x51\x3a\xaa\xa5\x84\x7d\x13\xe8\xbe\x84\x76\x09\x68\xe6\x4d\xc6” I appreciate your help

Member Avatar for EMERSON_1
0
10K
Member Avatar for MustafaScript
Member Avatar for Seher_1

how to calculate term frequency,inverse document frequency(tf-idf) for own text files that consists of many terms.

Member Avatar for Gribouillis
0
164
Member Avatar for turntomyleft

One of my first programs was coded on paper tape. Another was via punched cards. I foresaw amazing stuff, e.g., artificial intelligence, models for weather, space travel, etc., but never imagined we would come this far in only 60 years. I now have a programmer son who wants me to …

Member Avatar for vegaseat
0
758
Member Avatar for BustACode
Member Avatar for DustinS

I made client & server programs in C# based on this example code. c# client program: IPHostEntry ip = Dns.GetHostEntry(tbServer.Text);//"MyComputer-MSI" string addr = ip.AddressList[0].ToString(); TcpClient clientSocket = new TcpClient(addr, 1234); At the last line above, I got the message: An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in System.dll Additional information: …

0
109
Member Avatar for vegaseat
Member Avatar for vegaseat
4
684
Member Avatar for Julie_2

7— File Data Statistics In this project, you will write a program to read a series of values from a file and calculate the following statistics: • A count of the number of values read from the file • The sum (total) of the values read from the file • …

Member Avatar for vegaseat
0
185
Member Avatar for haven_u

Could someone help me out with implemeting a simple http POST method that receive and data through a socket. I would like to know how to simply get values entered in a html form. Since data receive form the socket includes headers as well as the actual data of interest.It …

Member Avatar for snippsat
0
184
Member Avatar for python1

How can we save a text file we make using python in another directory?The default directory is always the directory in which , the program is ? is there any way to change this?Can this be done when we are creating the file (FILE=open(filename,"w")) thanks in advance

Member Avatar for Parikshit_1
0
44K
Member Avatar for BustACode

Allows multiple entries using raw_input. I often have to enter multiple items in my Python programs. I desired an easier way than using a loop(s). Today I discovered a way, and with a few mods made it happen.

1
696
Member Avatar for jamesjohnson25

The perl command is perl /opt/translation/moses/scripts/tokenizer/tokenizer.perl -l en < Eng-hin.translation.en > Input/tokenization/Eng-hin.translation.tok.en I want to execute the above perl command in python script ,Here the perl command is executed successfully in Popen() but no output file is created at location "Input/tokenization/Eng-hin.translation.tok.en". var = "-l en < Input/Corpus/"+inputfilename+" > Input/tokenization/Eng-hin.translation.tok.en" pipe …

Member Avatar for woooee
0
412
Member Avatar for snippsat

It's started (: Find some videos that are interesting,feel free to post link or discuses it here. I was looking most forward to David Beazley talks. Live coding with Concurrency as topic,doesn't get much better than this. [David Beazley - Python Concurrency From the Ground](https://www.youtube.com/watch?v=MCs5OvhV9S4) The main talk David Beazley …

Member Avatar for vegaseat
3
172
Member Avatar for vegaseat

Just an example of a persistent list class that could have interesting applications in data mining.

1
674

The End.