Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Learning Python: need projects for beginners

Name: Anonymous 2008-05-07 12:52

Hello EXPERT PROGRAMMERS

I am re-learning python/reinforcing what I know and I have written some simple apps, one is a cgi youtube downloader. I am going to write some stuff for del.icio.us and other API's.

Please post some ideas for some projects that would help me become more comfortable with python. Bonus points for web related/irc related.

Please keep the ideas at the beginner level as I am not an
EXPERT PROGRAMMER

Name: Anonymous 2008-05-07 12:55

Write a function substring that checks whether str1 is a substring of str2.

Name: Anonymous 2008-05-07 13:07

import re
def substr(arg1, arg2):
    if re.search(arg1, arg2) == None:
       print 'No match found'
    else:
       print "found match at " + repr(re.search(arg1, arg2).span())

>>> substr("jarrod", "asldkjfhsalkdfjhasdkfljhasdfkjarrodshdfdafasdf")

found match at (29, 35)


>>> substr("jarrod", "asldkjfhsalkdfjhasdkfljhasdfkjarodshdfdafasdf")

No match found

Next test please. I will be back later. I want to build something cool. Like a web mp3 player so I can learn more.

Please give me more tests.

Name: Anonymous 2008-05-07 13:10

Write a function that will generate the n first Fibonacci numbers

Name: Anonymous 2008-05-07 13:18


substr x [] n = False
substr [] ys n = True
substr (x:xs) (y:ys) n = x == y && substr xs ys (n+1)


How do I output n (the position of first converging character) so that I don't screw the types? With Either?

Name: Anonymous 2008-05-07 13:20

Go do the python challenge.

Name: Anonymous 2008-05-07 13:21

>>4
Also,

fibs = 0 : 1 : 1 : zipWith (+) fibs (tail fibs)

Name: Anonymous 2008-05-07 13:22

Never-mind, I just got trolle.d

Name: Anonymous 2008-05-07 15:19

The fibs and substring stuff is too easy.

Also I have done the first 5 or 6 in the pychal.

I will write some classes for web apis and an irc bot.

Name: Anonymous 2008-05-07 15:39

write a bbcode c preprocessor

Name: Anonymous 2008-05-07 16:26

h
 a
  x
  
   m
    y

     a
      n
       u
        s

Name: Anonymous 2008-05-07 16:31

Write a bbcode-mode for EMACS.

Oh wait u cant

LOL!!

Name: Anonymous 2008-05-07 16:35

>>3 needs to read http://en.wikipedia.org/wiki/String_searching_algorithm

anyways, doesn't really matter because >>2 was fairly lame

my idea: conway's game of life using ncurses

Name: Anonymous 2008-05-07 16:38

h
 a
  x
 
   m
    y

     a
      n
       u
        s

Name: Anonymous 2008-05-07 16:38

h
 a
  x
 
   m
    y

     a
      n
       u
        s

Name: Anonymous 2008-05-07 16:52

>>1

Try making a web server in python.  It's very fun because you can have 'live' content made in python scripts.

Name: Anonymous 2008-05-07 17:50

>>16
import BaseHTTPServer, SimpleHTTPServer
BaseHTTPServer.HTTPServer(('', 8080), SimpleHTTPServer.SimpleHTTPRequestHandler).serve_forever()

Name: Anonymous 2008-05-07 18:25

blowup l =
    concatMap (\(x,y) -> replicate x y) (zip [1..length l] l)

Name: Anonymous 2008-05-07 18:28

Actually,

blowup l =
    concatMap (uncurry replicate) (zip [1..length l] l)

Name: Anonymous 2008-05-07 18:58

>>19
map (uncurry f) (zip xs ys)zipWith f xs ys

Name: Anonymous 2008-05-07 19:00

I once tried to do (uncurry Ciel). The next day, I woke up with my ass all sore, like someone tried to suppress Roa in it.

Name: Anonymous 2008-05-07 19:17

>>21
back to /jp/, please

Name: Anonymous 2008-05-07 19:54

>>22
But how did you understand the joke in the first place, huh?

Name: Anonymous 2008-05-07 19:55

>>23
That's not the point

Name: Anonymous 2008-05-07 20:32

write a library that allows you to to bit-level file input and output

i.e. you can do

file.write(1) and it will write 1 bit
file.write(0) and it will write 0 bit

you can also do neat thigns like create wrappers for these

i.e. create

file.write_one_bit()
file.write_zero_bit()

and then you can do even more cool things like

file.write_random_bit()

make it a very robust library and maybe you can make a PEP.

Name: Anonymous 2008-05-07 21:00

>>25
Go away, Guido.

Name: Anonymous 2008-05-07 21:11

>>25
I lol'd.  That would be the most hard core library ever.

*Holds up spork()*

Name: Anonymous 2008-05-07 21:14

>>25
Wow.  You're almost as funny as http://labyrinthcomics.blogspot.com/

Name: Anonymous 2008-05-07 21:17

>>25-28
SPAWHBTE.

Name: Anonymous 2008-05-08 21:53

>>25

As I am not an EXPERT PROGRAMMER I do not know why that would be useful. Please explain.

Name: Anonymous 2008-05-09 1:15

>>30
I guess you could say it's only a bit useful.

Name: weird 2008-05-09 2:32

this is a cool forum

Name: Anonymous 2008-05-09 3:56

>>32
go back to reddit plz

Name: Anonymous 2008-05-09 4:03

While looking for info on artist-mode, I stumbled upon a reddit page about it. Now I know why you hate it with passion.

Name: Anonymous 2009-03-07 3:15

This is at the end of the python tutorial I am trying to work through. I have no idea if this is of your level:

Create your own command-line address-book program using which you can add,
modify, delete or search for your contacts such as friends, family and colleagues
and their information such as email address and/or phone number. Details must
be stored for later retrieval.

Name: Anonymous 2009-03-07 7:36

Write a function that generates a perfect sudoku on it's first attempt. It's bloody hard.

Name: Anonymous 2009-03-07 9:44

>>37
sub sudoku {
    print "7 2 6 4 9 3 8 1 5\n3 1 5 7 2 8 9 4 6\n4 8 9 6 5 1 2 3 7\n8 5 2 1 4 7 6 9 3\n6 7 3 9 8 5 1 2 4\n9 4 1 3 6 2 7 5 8\n1 9 4 8 3 6 5 7 2\n5 6 7 2 1 4 3 8 9\n2 3 8 5 7 9 4 6 1\n";
}

Name: Anonymous 2009-03-07 9:58

>>38
I meant a random one... I'm not even going to check if that's a legal sudoku either.

Name: Anonymous 2009-03-07 10:14

>>39
Who are you to say that this sudoku is not a random one?

Name: Anonymous 2009-03-07 10:35

>>40
he's the SUSSMAN

Name: Anonymous 2009-03-07 10:42

>>41
THE SUSSMAN is smarter than that.

Name: Anonymous 2009-03-07 10:52

>>42
THE SUSSMAN was EXPERT TROLLING you

Name: Anonymous 2009-03-07 10:55

>>43
THE SUSSMAN closed his eyes so that the sudoku would have no preconceptions about the room being random.

Name: Anonymous 2009-03-07 15:22

THE SUSSSSSSSSSSSSSSSSSSSSSSSMAN

Name: Anonymous 2009-03-07 15:28

>>1
Take the 6.01 class at MIT.

Name: Anonymous 2009-03-07 15:29

[b][u][sup]SUSSMAN![/u][/b]

Name: Anonymous 2009-03-07 15:29

FUCK

[b][u][sup]S[sup]USSMAN![/u][/b][b][u][sup]S[sup]USSMAN![/u][/b][b][u][sup]S[sup]USSMAN![/u][/b][b][u][sup]S[sup]USSMAN![/u][/b][b][u][sup]S[sup]USSMAN![/u][/b][b][u][sup]S[sup]USSMAN![/u][/b][b][u][sup]S[sup]USSMAN![/u][/b][b][u][sup]S[sup]USSMAN![/u][/b]

Name: Anonymous 2009-03-07 15:30

>>48
HOLY SHIT FUCKDAMN SHITCUNTS

SUSSMAN!
SUSSMAN!
SUSSMAN!
SUSSMAN!
SUSSMAN!
SUSSMAN!

Name: Anonymous 2009-03-07 15:31

SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!
SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!
SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!

Name: Lucky 7 Sussmen 2009-03-07 15:32

SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!
SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!
SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!
SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!
SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!
SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!
SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!SUSSMAN!

Name: Anonymous 2009-03-07 16:03

[b][i][sup][sup][u]S[sup]U[sup][/u][o]SSMAN![/sup][/sup][/sup][/sup][/i][/b]

Name: Anonymous 2009-03-07 16:04

>>52
fuck damn shit cunts

Name: Anonymous 2009-03-07 16:06

Name: Anonymous 2009-03-07 17:38

<a href="http://www.buyaionmoney.com">aion kina</a>
<a href="http://www.buyaionmoney.com">aion gold</a>
<a href="http://www.aiongold-money.com">aion gold</a>
<a href="http://www.aiongold-money.com">aion money</a>
<a href="http://www.aiongold-aiongold.com">aion kina</a>
<a href="http://www.aiongold-aiongold.com">aion gold</a>
<a href="http://www.rs2accounts-rs2accounts.com">runescape gold</a>
<a href="http://www.rs2accounts-rs2accounts.com">runescape money</a>
<a href="http://www.aionkina-aionkina.com">aion kina</a>
<a href="http://www.aionkina-aionkina.com">aion gold</a>
<a href="http://www.benniuw.com">股票软件</a>
<a href="http://www.benniuw.com">股票分析软件</a>

Name: Anonymous 2009-03-07 18:52

[sup][sup][sup]

Name: Anonymous 2011-02-03 6:18

Name: Sgt.Kabukiman緌 2012-05-23 5:17

All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy

Name: name !!jtTqSsN+V0O9aox 2012-07-15 0:06

test1

Name: name !!Czae4KQs0ob5kLW 2012-07-15 0:06

test2

Name: name !KDjYWIiOiM 2012-07-15 0:06

test3

Don't change these.
Name: Email:
Entire Thread Thread List