Search the web
Sign In
New User? Sign Up
perl-python
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 61 - 90 of 127   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Simplify | Expand   (Group by Topic) Author Sort by Date ^
61
Answer to the previous exercise. http://xahlee.org/perl-python/generate_pairings.html # perl sub genpair ($) { my $partiSet = $_[0]; my @result; for (my $head...
xah lee
p0lyglut
Online Now Send Email
Mar 2, 2005
4:07 am
62
I have a bunch of files encoded in gb18030 and i need to convert it to utf-16. Can i do that with Pyton? Yes. Such facilities is built-in in Python version...
Xah Lee
p0lyglut
Online Now Send Email
Mar 8, 2005
12:20 am
63
Is it possible in Python to create a function that maintains a variable value? Something like this: globe=0; def myFun(): globe=globe+1 return globe The answer...
xah lee
p0lyglut
Online Now Send Email
Mar 8, 2005
3:18 pm
64
here's the code. ... # python import os mydir= '/Users/t/web/p/monkey_king' def changeEncoding(filePath): '''take a full path to a file as input, and change...
xah lee
p0lyglut
Online Now Send Email
Mar 9, 2005
12:03 pm
65
here's a large exercise that uses what we built before. suppose you have tens of thousands of files in various directories. Some of these files are identical,...
xah lee
p0lyglut
Online Now Send Email
Mar 9, 2005
1:18 pm
66
previously we had find & replace string in a file: http://xahlee.org/perl-python/find_replace.html though, that code won't work for non-ascii files. For...
xah lee
p0lyglut
Online Now Send Email
Mar 10, 2005
2:03 am
67
python has this nice unicodedata module that deals with unicode nicely. #-*- coding: utf-8 -*- # python from unicodedata import * # each unicode char has a...
xah lee
p0lyglut
Online Now Send Email
Mar 15, 2005
9:57 am
68
here's a snippet of code that prints a range of unicode chars, along with their ordinal in hex, and name. chars without a name are skipped. (some of such are...
Xah Lee
p0lyglut
Online Now Send Email
Mar 16, 2005
10:04 am
69
... l=[] for i in range(0x0000, 0x0fff): l.append(eval('u"\\u%04x"' % i)) ... can be simplified to: for x in map (unichr, xrange(0x0000, 0x0fff)): - Sean...
Sean Gugler
drguzler
Offline Send Email
Mar 17, 2005
8:11 pm
70
Sorry i've been busy... Here's the Perl code. I have yet to clean up the code and make it compatible with the cleaned spec above. The code as it is performs...
Xah Lee
p0lyglut
Online Now Send Email
Mar 20, 2005
11:34 pm
71
Today we'll write a program that can sort a matrix in all possible ways. Here's the Perl documentation. I'll post a Perl and Python version in 2 days. ... ...
xah lee
p0lyglut
Online Now Send Email
Mar 22, 2005
5:13 pm
72
The Python doc is relatively lousy, from content organization to the tech writing quality. I think i'll just post snippets of my comments as i find them. (and ...
xah lee
p0lyglut
Online Now Send Email
Mar 25, 2005
5:21 am
73
Here's the solution to previous post. ... perl code: sub sort_matrix($$) { my $ref_matrix = $_[0]; my @indexMatrix = @{$_[1]}; my @indexes = map {$_->[0]}...
Xah Lee
p0lyglut
Online Now Send Email
Mar 28, 2005
4:22 am
74
According to the Python documentation* for 'sort', supplying a function for generating keys generally runs faster than supplying a function for comparing...
Sean Gugler
drguzler
Offline Send Email
Mar 28, 2005
7:41 pm
75
I get: NameError: global name 'reversed' is not defined ... ? I don't quite follow the logic... Xah ... On Mar 28, 2005, at 11:14 AM, Sean Gugler wrote: ...
xah lee
p0lyglut
Online Now Send Email
Mar 30, 2005
7:36 am
76
The 'reversed' function was introduced with Python 2.4. Older versions may instead use: directives.reverse() for (column, stringQ, directionQ) in directives: ...
Sean Gugler
drguzler
Offline Send Email
Mar 30, 2005
8:11 pm
77
i've updated the previous find & replace code. in the following page http://xahlee.org/perl-python/findreplace_regex.html is a code that does find & replace of...
xah lee
p0lyglut
Online Now Send Email
Apr 12, 2005
10:29 am
78
20050415 split a line by regex Here's another example of using regex. I have a file that is translation of Chinese lyrics. It is formatted like this: ...
Xah Lee
p0lyglut
Online Now Send Email
Apr 16, 2005
11:33 am
79
Unicode chars can be included in regex patterns directly. Just make sure your string starts with ur. For example: re.search(ur'苦',mystring,re.U). Unicode can...
xah lee
p0lyglut
Online Now Send Email
Apr 17, 2005
12:53 pm
80
long story short, here's a complete rewrite of Python's re module doc http://xahlee.org/perl-python/python_re-write/lib/module-re.html This documentation...
Xah Lee
p0lyglut
Online Now Send Email
Apr 19, 2005
5:59 pm
81
Notes on rewriting the Python documentation Xah Lee, 200505. In 2005, i started to learn Python by reading its official documentation. In the process, i find...
xah lee
p0lyglut
Online Now Send Email
May 6, 2005
4:58 pm
82
HTML Problems in Python Doc I don't know what kind of system is used to generate the Python docs, but it is quite unpleasant to work with manually, as there...
xah lee
p0lyglut
Online Now Send Email
May 7, 2005
5:32 am
83
Here is a illustration of the Info Tech industry's need for inane formality and spurious jargons. The official Python doc on regex syntax (...
Xah Lee
p0lyglut
Online Now Send Email
May 9, 2005
7:02 am
84
Today we'll be writing a function called Range. The Perl documentation is as follows. Perl & Python & Java Solutions will be posted in 48 hours. Perl-Python...
xah lee
p0lyglut
Online Now Send Email
May 13, 2005
2:24 am
85
Here's the Python solution to the Range problem. ... # -*- coding: utf-8 -*- # Python # http://xahlee.org/tree/tree.html # Xah Lee, 2005-05 # implementation...
Xah Lee
p0lyglut
Online Now Send Email
May 15, 2005
10:07 am
86
Here's the Perl solution to the Range problem. ... # perl # http://xahlee.org/tree/tree.html # Xah Lee, 2005-05 #_____ Range _____ _____ _____ _____ =pod ...
Xah Lee
p0lyglut
Online Now Send Email
May 15, 2005
10:07 am
87
the previous posted solutions are badly botched. Here's a better solution. Any further correction will appear on the website instead. (http:// ...
Xah Lee
p0lyglut
Online Now Send Email
May 15, 2005
4:33 pm
88
The following is a new section of the article “What are OOP's Jargons and Complexities” at http://xahlee.org/Periodic_dosage_dir/t2/oop.html ... The Rise...
xah lee
p0lyglut
Online Now Send Email
May 23, 2005
7:47 pm
89
The following is a new section of the article “What are OOP's Jargons and Complexities” at http://xahlee.org/Periodic_dosage_dir/t2/oop.html ... The Rise...
xah lee
p0lyglut
Online Now Send Email
May 24, 2005
8:16 pm
90
The following is a new section of the article “What are OOP's Jargons and Complexities” at http://xahlee.org/Periodic_dosage_dir/t2/oop.html ... the Rise...
xah lee
p0lyglut
Online Now Send Email
May 26, 2005
1:02 am
Messages 61 - 90 of 127   Oldest  |  < Older  |  Newer >  |  Newest
Advanced
Add to My Yahoo!      XML What's This?

Copyright 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help