Gaganpreet's blog

Recent Posts

Adapting types to fix SQLAlchemy's "can't adapt type" error

published on
I have recently been using Pydantic a lot, which is pretty cool since it lets me specify concrete types on my previously untyped data. Until I ran into an error when I was inserting data stored in a Pydantic model to my postgres database using SQLAlchemy. Problem I have a Pydantic model like this to define my incoming data from a request: # Pydantic class class EventSchema(BaseModel): ip_address: IPvAnyAddress Another part in my code defined an SQLAlchemy model to persist this incoming information (along with other data not shown here): Read More...

Fixing crackling audio on USB powered speakers and Raspberry Pi

published on
Powering USB speakers from Raspberry Pi I recently set up Mycroft (an open source personal assistant) on my Raspberry Pi. I bought a set of cheap speakers which run on USB power and plugged them into the 3.5mm output and the power cable to a USB port on the Pi itself. Right away I heard constant crackling noises coming out of the speakers. I figured I had a set of defective speakers but I could not reproduce this when I tried the same setup with my laptop. Read More...

The elusive bug

published on
(Note: This is something that happened earlier this year. A recent discussion reminded me that I should write about it and here it is) Symptoms The bug description wasn’t very helpful. The users couldn’t scroll on their Macs on this one website. Only on a few Macs, not all of them (for one, no one could reproduce this locally). Other operating systems (including iOS) worked fine for them. Other websites scrolled just fine. Read More...

Categories

Bugs (1)

Computers (3)

Crypto (2)

Felicity (1)

Fun (8)

Funny (4)

Hacking (2)

Health (1)

Howto (1)

Iiit (21)

Internet (2)

Life (17)

Linux (3)

Music (1)

Photography (1)

Programming (1)

Python (1)

Remote (2)

Scripting (3)

Security (2)

Stumbled (1)

Tech (8)

Tv (1)

Uncategorized (13)

Tags

adler (1) anand-buddha-vihar (1) at_fdcwd (1) bash (1) bc (5) blowfish (1) bug (1) bugs (1) cbc (1) ccavenue (1) chmod (1) college (1) coreavc (1) crackling (1) cryptography (1) css (1) ctf (1) ctf3 (1) curl (1) ddos (1) direcpay (1) ebs (1) ecb (1) exam (1) exams (1) faq (1) favorite-stuff (1) february-09 (1) february-2009 (1) felicity (1) felicity-09 (1) ffmpeg (1) firebug (1) firefox (1) flask (1) form (1) fun (4) funny (5) gaming (1) google (1) goraft (1) h264 (1) hack (1) hmac (1) homeopathic (1) homeopathy (1) howto (1) hsts (1) human-values (1) humor (2) hyderabad (1) iiit (11) iiit-hyderabad (1) incompetence (1) india (1) intervention (1) isas (1) it-crowd (1) jeevan-vidya (1) justin.tv (1) jv (1) kde (1) kwallet (1) lessons (1) life (5) linux (3) mac-os (1) madwifi (1) matrix (1) md5 (1) medicine (1) microsoft (1) ms-fanboy (1) music (1) night-out (1) nodejs (1) opensuse (1) optimizing (1) overflow (1) overlay (1) payment-gateways (1) payu (1) payzippy (1) permission-denied (1) photography (1) photography-club (1) pip (1) piss-off (1) popping (1) programmingerror (1) pydantic (1) pyqt (1) pyside (1) python (3) qdatastream (1) qsortfilterproxymodel (1) qt (1) qtreeview (1) raspberry-pi (1) rc4 (1) research (1) rm (1) scripting (1) scroll (1) security (1) server-room (1) sha (1) sha1 (2) shopify (1) sitcom (1) sleep (1) sqlalchemy (2) sqlcluster (1) stream (1) streaming (1) stripe (1) stripe-ctf (1) study (1) swine-flu (1) tag-post (1) the-unit (1) transecute (1) tv (1) twitch.tv (1) typescript (1) usb (1) wallet (1) webcam (1) wifi (1) wikipedia (1) zaakpay (1)