Skip to content

Instantly share code, notes, and snippets.

View tdadadavid's full-sized avatar
🫅
Work of Art🧑‍🎨✌️

David Dada tdadadavid

🫅
Work of Art🧑‍🎨✌️
View GitHub Profile
package common
import (
"bytes"
"encoding/json"
"encoding/xml"
"io"
"net/http"
gourl "net/url"
"strings"
@EmilHernvall
EmilHernvall / data2sound.py
Created September 29, 2011 14:07
Encode data as sound, and retrieve it using a FFT
class GlobalFormat(object):
def __init__(self):
self.id = 0x46464952 # RIFF
self.size = 0
self.type = 0x45564157 # WAVE
def as_bin(self):
return struct.pack("III", self.id, self.size, self.type)