Skip to content

Instantly share code, notes, and snippets.

import os
import sys
from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
def make_qr_jpg(png_image):
bg = Image.new("RGB", png_image.size, (0, 0, 0))
bg.paste(png_image, png_image)
@harisibrahimkv
harisibrahimkv / redis.md
Created July 16, 2014 16:34
Redis - What, why & where. PyCon Singapore 2014.

Ladies and gentlemen,

Do you know what my prayer was the moment I knew I got my talk selected? That I would not be allocated a slot right after lunch. Yet here we are.

You must be wondering why a dude from India has come all the way over to Singapore and is giving a talk on Redis at a Python conference. Well, I believe you'll have the answers to those questions by the time I am done with my talk. This is intended for a beginner level audience and as such, if you have already implemented redis in your stack, then you might be a little disappointed.

There are times when, in your Django web application, you need a certain specific data to be saved. Let me give you an example. Let us say you are gathering all the tweets for the Football World Cup. You hit the Twitter API and tweets are pouring in by the second. How do you keep a counter? Of course, put a Python variable in the loop and keep incrementing.

tweets = fetch_tweets(hashtag = "#WorldCup2014") #Use the Twython Library
@harisibrahimkv
harisibrahimkv / diaspora_promotion.md
Last active August 29, 2015 13:57
HashKochi - Kochi's own Social Media.

HashKochi - Kochi's own Social Media (Colleges)

The universe expands, but our world gets smaller and smaller. Not geographically, but relationship-wise. All you need is a moment to express your thoughts to the world. The advent of Internet, and the day by day evolution of software has helped us achieve this. However, evolution is a continuous process and with or without consent all of us are a part of it.

Presenting - HashKochi, a social media platform for us, run by ourselves. Keep your identity, talk with your friends and family, share your thoughts; all these without having to worry about whether someone will be spying on you. HashKochi is the next step in the evolution of Internet and we are proud to bring it alive. Support us and be a part of the growing web.

Where Facebook and Google have made their presence felt throughout the world, our contribution have been just as users. However, with HashKochi, we have the chance to be a part of something that is much bigger

@harisibrahimkv
harisibrahimkv / setup.md
Last active September 18, 2023 06:26
Virtualenv, Django & PostgreSQL setup instructions for the Django beginner level workshop.

Setup (Linux)

Virtualenv

It is always recommened to use virtualenv while you are doing development. virtualenv lets you create isolated development environments. It will help you not to mixup dependencies when working on more than one project on your machine.