15,175 Topics
| |
Hi guys, I developed JIT compiler for Python. It compiles simplified Python code directly to x86 native code. Focus here is usage on SIMD instructions. With SIMDy you can easily outperform C++ in compute intensive tasks like monte carlo simulations, rendering, fluid simulations, etc... Web(WIP): www.tahir007.com I would like to … | |
I have the following code I wrote on windows 7: canvas_width = 150 canvas_height = 150 brush_size = 3 color = "black" def paint(event): global brush_size global color x1 = event.x - brush_size x2 = event.x + brush_size y1 = event.y - brush_size y2 = event.y + brush_size w.create_oval(x1, y1, … | |
I need a function that will create and store usernames and passwords for different students. Their programme should ask the user for their name and age and a username should be created, consisted of their name and age eg. Jack16. They then can make up their own password which then … | |
Shows how to create a basic slide show with the Python Tkinter GUI toolkit. | |
Hello there! I'm wondering what are the options I have. My skills are not adequate for this kind of task. But I'm thinking now about either seeking for a partner with sufficient skills or hiring team of developers. In both cases what could you advise? What competence is needed for … | |
I am creating a client server program on which client downloads server's files. it works fine in localhost, but the problem occurs in except localhost connection. I've tried googling but none of the solutions(from previously suggested to the same problem) works. Here is my code: def upload(sock): # server.py filename … | |
I've been reading through a beginner's book for Python, and I can't quite get this example to work perfectly. active = True age = "" while active: age = input("Please enter your age ") if str(age) == 'quit': active = False elif int(age) < 3 and int(age) != 0: price … | |
Hello. I'm learning tkinter and trying out the opening file bit and im obviously doing something wrong. def init_window(self): self.txt = Text(self) self.txt.pack(fill=BOTH, expand=1) def open_file(self): filetypes = [('All files', '*')] dialog = filedialog.Open(self, filetypes=filetypes) showD = dialog.show() if showD!= '': text = self.readFile(showD) self.txt.insert(END, txt) def readFile(self, filename): with … | |
Hey there, I am trying to create a register code. So basicly im making a quiz and every time a user starts up my program he/she needs to register (making a unique username/pass) -When registered it will ask to login. Could anyone help me make the code? My code so … | |
Hi guys i need some help i am tryig to code a python fake bank system. The program needs to be able to deposit withdraw,check the balance and quit the program however my code doesnt seem to be working for some reason can someone please help me. Please find attached … | |
Guys, I am trying to change the background color of my window in WxPython. Here is what I got: Why doesn't it work? [CODE]import wx class my_window(wx.Frame): def __int__(self, parent, id): wx.Frame.__int__(self,parent,id,'My Window', size=(300,200)) self.Colours() def Colours(self): self.pnl1.SetBackgroundColour(wx.BLACK) if __name__ == "__main__": app=wx.PySimpleApp() frame=my_window(parent=None,id=-1) frame.Show() app.MainLoop()[/CODE] | |
So I have to write a program that takes the amount and weight of pumpkins entered by a person and then outputs them back with their corrisponding weight class that i specify. I keep getting a syntax error on the elif statement and I was wondering if i could have … | |
Using Python, tokenize using space as a parameter. Count the total number of words in the document and the frequency of each word. Also, identify the word with least frequency appearance and most frequency appearance | |
Hey been practicing coding using Python 3 tutorial,my question is how to put what learn into a project,or should I say how or what information is their to get this mindset | |
I have two dataframes and I need to separate rows where a value from pmdf matches one of the codes in jcrdf.All_codes. If pmdf.code is in jcrdf.All_codes, I need a dataframe with all values from jcrdf AND pmdf.count. Dataframes: pmdf = pd.DataFrame( { 'code': ['0567-8315','0007-4977','0096-0225','1365-2133','8675-309J'], 'count':['6','7','10','2','1'] } ) jcrdf = … | |
Hello, everybody. I was wondering if anybody could help me with something. I don't know if I'm taking things too fast but, I was wondering if somebody could help with this program I am making. I'm currently writing a "fake" bank script. Basically you start with a set amount of … | |
hey mr /ms i need that we could discuss a new idea how can we improve python and make it more easy to install modules and other staff | |
hello freinds i have put an image (self.image) on my window background now, i need to put another image(mi_but1) on this window.. my problem: image mi_but1 is put on window with a gray square behind it(a gray square between image mi_but1 and window's background) .the final gui doesnt look nice.i … | |
I need some help why can't I create an instance of the child class without an error ? class tv(): def _init__(self,color,screen,frame): self.color=color self.screen = screen self.frame = frame def DesOfTV(self): info = "The TV has a"+self.color+"and a"+self.screen+"screen" return info class retroTV(tv): def __init__(self,color,screen,frame): super().__init__(color,screen,frame) oldertV = retroTV("black","tuber","wood") | |
Hello. I have a project to develop a tool that reads Windows 7 raw memory dump. My lecturer says that he'd rather we use python or c coz that's his specialy but we can choose whatever. We chose python (bcoz i feel like its an opportunity to further learn about … | |
I want to draw a checkerboard on Python, but I only get one black square. Can you help me fix this program? import turtle def filled_square(size, color, x, y): turtle.setpos(x, y) turtle.color(color) turtle.begin_fill() for i in range(4): angle = 90 turtle.fd(size) turtle.lt(angle) turtle.end_fill() turtle.up() import sys n = int(sys.argv[1]) s … | |
Hello! Can you give me an example of Button widget in Kivy language? I can creat the button but don't know how to use it's callback. I mean how can i set a command for the Button in Kivy? | |
long waitingTime(vector<int> tickets, int p) { // bool flag indicates whether it's Jesse or not queue<pair<int, bool> > aQueue; for(int i = 0; i < tickets.size(); i++) { aQueue.push(make_pair(tickets[i], i == p)); } long long nTime = 1; while(!aQueue.empty()) { pair<int, bool> aItem = aQueue.front(); aQueue.pop(); nTime++; if(aItem.first == 1 … | |
Is it possible to integrate Perfect Circles of the Golden ratio geometry in designing logo based on these link ( https://goo.gl/images/7eYZoG ) to recognize flower.. What do you think guys? Im planning to have a research on this. | |
I want to print the count N letters of string but it result in error can anybody help me? import subprocess variable = "making" s = subprocess.Popen(("grep","-o -w","%s"%variable, "output.txt|wc -w"), stdout = subprocess.PIPE) output = s.communicate()[0] print(output) | |
so I'm working on a class for a vector which I want to hash like a tuple, and to do so, a vector instance needs acess to it's properties. here's the constructor for the performative properties I'm using, and the vector class: def newProp(): newdict = {} getter = newdict.get … | |
I have a text file containing the following data. ascon1 201707011 John 77.5 11.5 11.5 11.5 ascon1 201707012 Grld 70.0 11.5 11.5 11.5 ascon1 201707013 Josh 79.5 11.5 11.5 11.5 ascon1 201707014 Jess 67.5 11.5 11.5 11.5 ascon1 201707015 Jack 97.5 11.5 11.5 11.5 I need the data to look … | |
# Am looking for best practises of displaying document info in tkinter messagebox from tkinter import * from tkinter import messagebox def profile(): messagebox.showinfo("info","college\tNew student\tGraduating students\noak institue\t202\t210\nPine college\t143\t121") root =Tk() root.geometry("200x200") C = Button(text="copyright",command=profile).pack() root.mainloop() #I think if am going to type all the info in the document the arrangement … | |
Hello. I am making a program that interacts with MySQL database/table. I ran into 2 problems. The first one is about saving data which user entered into cell/or edited existing data in cell. The second problem is about inserting new row. Row is inserted, but it still shows error in … |
The End.