I am not familiar with numpy, but you might like to take a look at
y_serial which allows you to store python objects in sqlite:
http://yserial.sourceforge.net/
Take care,
Don
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscripti
#Here's my try:
vowel_killer_dict = { ord(a): None for a in 'aeiou'}
def devocalize(word):
return word.translate(vowel_killer_dict)
vowelled = ['him', 'ham', 'hum', 'fun', 'fan']
vowelled = set(vowelled)
devocalise_dict={}
for a in vowelled:
devocalise_dict[a]= devocalize(a)
un
Emad Nawfal (عمـ نوفل ـاد) dixit:
> Dear Tutors,
> The purpose of this script is to see how many vocalized forms map to a
> single consonantal form. For example, the form "fn" could be fan, fin, fun.
>
> The input is a large list (taken from a file) that has ordinary words. The
> script creates
2009/12/21 Alan Gauld
>
> "Emad Nawfal (عمـ نوفل ـاد)" wrote
>
>
> def devocalize(word):
>>vowels = "aiou"
>>
> Should this include 'e'?
>
> return "".join([letter for letter in word if letter not in vowels])
>>
>
> Its probably faster to use a regular expression replacement.
> Simply r
"Emad Nawfal (عمـ نوفل ـاد)" wrote
def devocalize(word):
vowels = "aiou"
Should this include 'e'?
return "".join([letter for letter in word if letter not in vowels])
Its probably faster to use a regular expression replacement.
Simply replace any vowel with the empty string.
vowell
Emad Nawfal (عمـ نوفل ـاد) wrote:
Dear Tutors,
The purpose of this script is to see how many vocalized forms map to a
single consonantal form. For example, the form "fn" could be fan, fin,
fun.
The input is a large list (taken from a file) that has ordinary words.
What does "ordinary" mean
Hey all,
I keep getting a connection error 111 connection refused. When i try to
connect to a server at a remote ip address.
I am using linux on both computers.
the socket server looks like this:
#!/usr/bin/python
import SocketServer
class MyTCPHandler(SocketServer.BaseRequestHandler):
def
Hey all,
I keep getting a connection error 111 connection refused. When i try to
connect to a server at a remote ip address.
I am using linux on both computers.
the socket server looks like this:
#!/usr/bin/python
import SocketServer
class MyTCPHandler(SocketServer.BaseRequestHandler):
def
Dear Tutors,
The purpose of this script is to see how many vocalized forms map to a
single consonantal form. For example, the form "fn" could be fan, fin, fun.
The input is a large list (taken from a file) that has ordinary words. The
script creates a devocalized list, then compares the two lists.
David Perlman wrote:
If I make a subclass of a built-in class, like this:
class mylist(list):
def __init__(self):
list.__init__(self)
Then it is valid for me to do this:
>>> x=mylist()
>>> x.hello=3
>>>
But I can't do this:
>>> y=list()
>>> y.hello=3
Traceback (most recent call l
Dear Folks,
I am wondering about the most efficient way to save a numpy.ndarray in
a sqlite3 database file.
I was initially thinking about using the 'buffer' type and creating a
'blob' field in the database.
however the .from_buffer() routines in numpy assume the array to be
recreated having
11 matches
Mail list logo