| Navigation |
[Dec. 31st, 2010|12:00 am] |
|
| To subscribe, enter your email: |
|
|
|
|
|
|
| How-to build the smallest mp3 |
[Oct. 25th, 2005|03:43 pm] |
<tr><td class="meta" style="background-color:#ffffff; color:#000000; border-bottom:solid #777777 2px" colspan="2" width="600px">
The smallest lo-fi playable mp3:
32kHz, mono and without copyright (please give credit)
111111111111101100011000110001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111011000110001100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111110110001100011000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Due to its constant zero volume, this mp3 is ideal for very short meditations.
A noisy version coud be:
111111111111101100011000110001000001111100001000111110011010010110101111101100101100010011110000111011110011010101000100010010010010110010000001000011110101000000110000001110011101000011000100100100010101010100110011001011001010010001011011000101010111000011100000110101001001101101111001011101001010101001110100101110010010110010010001101100101100110111001110010011011000101011010101111111110100110111010111111011100110010101101111010011111011111111001010001011000000011101111101100110101101110000101010001000111010001000010000000000101011001101100001001000011000001100001110111001011001010010000001101101011100111100111111011001001101000101001101110101001100100001000010010110011000111011110011010001111110101101111111100001000110011011100001110000010111101010011011100010100011110011111000011010111001101001000011011100010011011111000011111000101010101010111000100010101000010111101001100110110111010100100111001100010011110101100001101100010101001110100111010101110010011011010101100010110000000010101001001111000101001010000110000111001001110110100110010111000010011001010011110100100111100010101100110001111010011100111010111100110110101000011110111111111111101100011000110001000011101110011101110001101010001001011011100000101000000011011010111110101111111000011000110100100000101001100001110111101111010100010001010011001101101010101110000011000110111000100110111000110111111111000010101011011011010100110001011011101110001101100111110101101000100110000000000100000100101010110001111000011010110100101111000000100101100010000010010000010000011110010110111011010000110111000010001111011110001100000100111011000000100010100110011000010000010001111001011010001100000011001101010011111001100011111000110001011001010100100101111110011100010011110011010101010100101111001011101100000110111110111111011110000101000011111110111011110110101111001100010111000001100101110000101100110000010100101010111110011010111001110001100111100100011011000100100100110011011000000101111010010000101101111001101010100011111111010111011000111111010010010001010001010110001110101101011010011110100011100001110100000000001110000000110011010010110001011110101001101100011000110000111110101100010000000111110011111110111011100101011100010111101010010001011000001000001000011111011110100010111101010000100001111100100110110011111111111111101100011000110001000000110010110100101011110010001001101000000101001111010111111011100000110100001100100011110111010111010011110100111001010010010011110100101011100000010100001010001000011010011101010101101001001110001001110110000101011011000011101100110010001110101000010101001001110100111011011000010100011101100110011011110011010100100000110100000011100000110111010100010010111111110111011011101001100011100000110101110111100011110010011111001100001010101011101000110010101011010010100011011100101000001101101011001100101011000010101001011110111100100010010111010101000001010100101011111001001001000100110100101100111000001011001000011101111101010001000110011101111001000111100101001000001001011111101000101010001100000011100101100101111011110101110100010101110010111011011100011101111111110111011111101000000101000100001100000001111100111001000111110001100000111101001111010010001100011110011111000000011110110110100111100001010001101100000111100110010111111101001110010011001100111110100111111011001000011111101100000011001100011010111111101101101000000110100010100110111001101111000010111100000001100000011111101000100011011011011100
This entry follows a discussion in the blog of david_f.
And it has been submitted to the Guiness World Records under the application number WC146475.
( Read more... )
</td></tr>
432 bytes of music
|
|
|
| The Python I like - A CDR streams read method |
[Aug. 19th, 2005|06:24 pm] |
Here below a function decoding IIOP's CDR streams:
def ACE_read(typeLength):
if typeLength: # scalar (char:1, int:4, ...)
def sclRead(buf, index, big=1):
alignedIndex=(index + (typeLength-1)) & ~(typeLength-1)
if alignedIndex + typeLength > len(buf):
return None, None, False
endIndex=alignedIndex + typeLength
return ordn(big)(buf[alignedIndex:endIndex]), endIndex, True
return sclRead
else: # string
def strRead(buf,index,length,big=1):
endIndex =index + length
if endIndex > len(buf): return None, None, False
return buf[index:endIndex], endIndex, True
return strRead
|
I like nested functions...
And I like functions returning tuples !
Usage examples:
# reads a 13 bytes string and actualize index
__aString, index, ok = ACE_read(0)(buffer, index, 13)
if not ok: doSomething()
# reads an
aligned-4-byte-long integer located somewhere by index
__anInteger, index, ok =
ACE_read(4)(buffer, index)
|
|
|
| The Python I like - A string to integer converter |
[Aug. 19th, 2005|04:33 pm] |
The following function converts a sequence of bytes into an integer. It is endianness-sensitive:
def ordn(big=1):
if big % 2:
def bordn(seq):
if len(seq) > 1: return ord(seq[-1]) + (bordn(seq[:-1]) << 8)
else: return ord(seq[0])
return bordn
else:
def lordn(seq):
if len(seq) >1: return ord(seq[0]) + (lordn(seq[1:]) << 8)
else: return ord(seq[0])
return lordn
|
>>> ordn(1)('\x01\x00')
256
>>> ordn(0)('\x01\x00')
1
Ok, that's probably not the prettiest nor the fastest way to do...
|
|
|
| The Python I like - a bit of functional programming |
[Aug. 19th, 2005|02:57 pm] |
To insert a white space before each uppercase letter within a string:
"".join([(i.isupper() and " "+i) or i for i in "PythonIsCool"])
or for the ones who like functional programming:
"".join(map(lambda x:(x.isupper() and " "+x) or x,"PythonIsCool"))
But I do personnally do like list comprehensions... |
|
|
| navigation |
| [ |
viewing |
| |
most recent entries |
] |
| |
|
|