14,951 Topics

Member Avatar for
Member Avatar for vegaseat

The module pyglet leans on OpenGL for graphics and is used in the scientific community together with Python. This short code snippet shows you how to use it to display an animated GIF file. The download is free, so give it a try. You don't have to download OpenGL to …

Member Avatar for kwekey
4
17K
Member Avatar for Abdulkabir_1

ID Arrival Departure ArrivalDate DepatureDate 1001 New York Holland 2009-09-23 2012-07-23 1301 Florida Germany 2010-10-23 2012-10-11 1401 New York Holland 2009-09-23 2009-09-25 1301 New York Beijing 2009-09-23 2010-09-21 1201 New York Holland 2008-01-01 2009-09-23 1001 Virginia New York 2008-01-01 2009-09-22 1021 New York Holland 2009-09-23 2009-09-25 1001 New York Holland …

Member Avatar for rproffitt
0
347
Member Avatar for Aeonix

If I wrote a program which would `Console.WriteLine()` a base64 code, like an easter egg ("a hidden secret" in gaming jargon) or something, for example string EasterEgg = "dGhlYmlnc2VjcmV0"; Console.WriteLine(b64d(EasterEgg)); And I would let a good obfuscator run through it. Now I know that crackers with enough time and knowledge …

Member Avatar for Aeonix
0
445
Member Avatar for Anton_6

I have the following code: lista_cosas=[] class cosa(): global lista_cosas def __init__(self,color): self.color=color def operacion(self): if self.color=="verde": lista_cosas.append(cosa("azul")) else: lista_cosas.append(cosa("verde")) c=cosa("verde") lista_cosas.append(c) n=0 while n<10: n+=1 for cosa in lista_cosas: cosa.operacion() and it gives me the following error: Traceback (most recent call last): File "C:/Users/elster/Desktop/Cancer modelling with python/recursive_test.py", line 21, …

Member Avatar for chriswelborn
0
544
Member Avatar for Popc0rn

I'm hoping to create a scheduler based on data extracted from an Excel (2016) spreadsheet. At the moment I'm using Ubuntu 14.04 LTS with the desire to port the completed project to Android through Bulldozer. I like what I've heard about the simplicity of Pyqt. The completed project must work …

0
210
Member Avatar for thayl0

Random Number File Writer: Write a program that writes a series of random numbers to a file. Each random umber should be in range of 1 through 500. The application should let user specify how many numbers the file will hold. Which I have. __author__ = 'Preston Howard' # Random …

Member Avatar for Gribouillis
0
792
Member Avatar for Money_maker_11

Hi guys. I have a program where users enter in their username and password. If the password and username match with the record stored in a database, they are able to pay a game which opens in a new window. If the entered information is correct, I want to print …

Member Avatar for Husoski
0
229
Member Avatar for Abdulkabir_1

I want to consider Arrival Column and Departure, but let me consider the ARRIVAL. I have "Paris" and "Los Angeles", I want to create a dictionary that will deplay everything associated to the "Paris" and every that has to do "Los Angeles". In case they are more than more than …

0
99
Member Avatar for sun_2588

Hi, I am trying to build a scrapper and for that I am using mechanize to get the page source then beautiful soup to parse it. But yesterday I faced a very strange error the page source which I am getting is kind of binary, though from browser I can …

Member Avatar for chriswelborn
0
296
Member Avatar for arindam31

Here is a weird regular expression for emails . We can have various kind of email addresses [email]string1@somemail.com[/email] [email]string1@somemail.co.in[/email] [email]string1.string2@somemail.com[/email] [email]string1.string2@somemail.co.in[/email] The following regular expression can find any of the mails above email2="santa.banta@gmail.co.in" email1="arindam31@yahoo.co.in'" email="bogusemail123@sillymail.com" email3="santa.banta.manta@gmail.co.in" email4="santa.banta.manta@gmail.co.in.xv.fg.gh" email5="abc.dcf@ghj.org" email6="santa.banta.manta@gmail.co.in.org" [CODE]re.search('\w+[.|\w]\w+@\w+[.]\w+[.|\w+]\w+',email) >>> x=re.search('\w+[.|\w]\w+@\w+[.]\w+[.|\w+]\w+',email2) >>> x.group() 'santa.banta@gmail.co.in' >>> x=re.search('\w+[.|\w]\w+@\w+[.]\w+[.|\w+]\w+',email1) >>> x.group() 'arindam31@yahoo.co.in' …

Member Avatar for Syed Sulaiman
3
10K
Member Avatar for bryann

Hi, I'm trying to write code that will allow me to assign values to lists of strings. I then want to compare user input to the lists and create a scoring system based on what has been typed in. For example if the input contains letters in list1 then the …

Member Avatar for snippsat
0
257
Member Avatar for Abdulkabir_1

My issue is much. I have a csv file, and want to select where Arrival or Departure and must be the same "date and time" have the same value. I can only read from csv file but can't go further import pandas as pd df = pd.read_csv("data.csv") row = next(df.iterrows())[1] …

Member Avatar for Abdulkabir_1
0
571
Member Avatar for DarkRm

Hi everyone I am new with you. I study in the university, they teaching us many programming languages. I wont you to help me to found the best to focus on. thank you by the way I am good in java ...

Member Avatar for rubberman
0
261
Member Avatar for gishi

hi! i want to place the contents of a dictionary into a csv file. Can someone help me with this? i already have the code in reading the csv file [CODE] import csv reader = csv.reader(open("c:\sample.dat")) for row in reader: print row [/CODE] i want the first element of the …

Member Avatar for Gribouillis
0
15K
Member Avatar for rhys1619

hi this is my quiz. what i need to do is add a thing at the start where it askes the user their age. if the user is under the age of 5 they will only be asked 5 question and if there 5 or above they will be asked …

Member Avatar for fonzali
0
199
Member Avatar for Sukka_1

Hello friends, I'm currently in Tech class doing a project on a very old version of python and need help animating a moving object. I have no idea what to do please help i need to create a winter wonderland Landscape with a cabin, trees, a chimney with active smoke …

Member Avatar for David W
0
532
Member Avatar for rhys1619

hi there what i've tried a lot is to make it so at the start of the quiz it asks the user there age. if the user is under 5 they will only be asked 5 questions and if there over 5 they will be asked all 10 #rhys translation …

0
110
Member Avatar for SpiritualMadMan

I have a form from which I can launch various Test Modules. The Form has 16 PushButtons, one for each of the possible Modules. I need to disable Button_2 through Button_11 until the Modules that are connected to Button_1 and Button_0 are succesfully completed. The Buttons are on a pyQT …

Member Avatar for Gribouillis
1
7K
Member Avatar for arindam31

I am trying to find out if a button is disabled....If it is , I want to enable it . For example : if button disabled: self.convertButton.setDisabled(False) So what can be button disabled be?

Member Avatar for Taywin
0
231
Member Avatar for rhys1619

Hi this is a quiz i'm making for school. I've tried to add a restart but nothing worked. i want it to say "do you want to restart". the user then types yes or no and it will begin the quiz again. PLEASE HELP thanks # rhys translation quiz #intro …

Member Avatar for Gribouillis
0
323
Member Avatar for vegaseat

Just a simple exploration of the goslate module (uses the Google Translate API) to translate some common languages. However, some IDE's create character problems. Note: Your computer has to be connected to the Internet to access Google.

Member Avatar for Ekta_1
3
2K
Member Avatar for micksulley

I have been using Eric to develop Python2.7 code for a while. I have just tried to look at Python3 and cannot figure out how to do it in Eric. Setting > Preferences > Python says Python2 uses .py extension, Python3 uses .py3 I create hello.py3 #!/usr/bin/env python3 from platform …

Member Avatar for micksulley
0
422
Member Avatar for homeboy

Hi guys, could you tell me how to solve this problem. This is what i've done. The result show : [9, 2, 6] [3, 9, 5] l1 = [4,9,2,6] l2 = [3,9,4,5] i = 0 j = 0 while(i < len(l1)): while(j < len(l2)): if(l1[i] == l2[j]): del(l1[i]) del(l2[j]) j …

Member Avatar for invisal
0
298
Member Avatar for powerade661

So I am trying to make this code run in a constant loop. Any ideas how I would do this? As I said before I am trying to self teach myself Python and so far I have been successful. import os import datetime import time print('What would you like to …

Member Avatar for powerade661
0
362
Member Avatar for Jaspreet_3

Hi, I need help if my Pseudocode is correctCreate and load an array with the following 7 values. Then add one more word (of your own choosing) to the array for a total of 8 words. This is a very basic programming class. We use Raptor lol biff comely fez …

Member Avatar for rproffitt
0
1K
Member Avatar for glao

Hello , Let's say I have : def mine( a, b ): return a>=b - 1 I can't understand what's going on with the -1. So , if a = 4 , b = 2 , it gives True If the opposite it gives False. As I said I don't …

Member Avatar for glao
0
144
Member Avatar for tony75

Hi I have an python script send me log files and ip address from my PC-B Is it posssible to add functins that I can Remote uninstall (distance)my script from my PC-B? if yes how? any idea?

Member Avatar for rproffitt
0
370
Member Avatar for Nick_11

char patron10(int m , int n ) char patron10(int m , int n ) { for ( int = 0 ; i < m ; i++) cout<< "." ; int a = 0 ; while (True) { cout<< 10*a ; if (10*a >= n) break ; for ( int i …

Member Avatar for Taywin
0
260
Member Avatar for v1shwa

Hello, I'm a python beginner & I'm learning it on my own. So, I've few (dumb) questions about it. - Where should I host a python project on linux? I'm sure there'd be multiple choices. So, Where would you host it & on what circumstances? - I understand that `virtualenv` …

Member Avatar for v1shwa
0
570
Member Avatar for ipman99

I just started to learn python few days ago. This is a small program I made to practise. print("Find Volumes of some Popular Solids") print("") names=['(1) Sphere','(2) Right Circular Cone','(3) Cylinder'] x=0 while x < 3: print(names[x]) x +=1 print('\n' + 'Enter the number of the solid, you want to …

Member Avatar for snippsat
0
2K

The End.