Skip to content

Instantly share code, notes, and snippets.

@hiway
hiway / devanagari_math.py
Created October 9, 2013 12:44
A quick n' dirty hack for doing math and getting output in Devanagari script (Unicode) instead of ASCII.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def devanagari_math(statement):
trans = {
u'१':'1',
u'२':'2',
u'३':'3',
u'४':'4',
u'५':'5',
@atmb4u
atmb4u / മലയാളം.py
Last active December 24, 2015 01:59
A quick proof that python unicode works; and it works beautifully! Python 3.x example.
class സൂചിക:
"""
മലയാളത്തിൽ പൈതോണ്‍ കോഡ് ചെയ്യാം എന്നുള്ളതിനുള്ള തെളിവ്
Proof that python can use malayalam language (Only on Python 3x)
"""
def സൂചിക(സ്വയം):
print(u"പൈതോണ്‍ ഇപ്പോൾ മലയാളത്തിലും !")
സൂചി = സൂചിക()
സൂചി.സൂചിക()
@willurd
willurd / web-servers.md
Last active May 17, 2024 05:43
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@pilt
pilt / Gemfile
Created July 30, 2011 12:46
Incorporating Jammit with Django
source "http://rubygems.org"
gem "jammit"
gem "closure-compiler"
@jmazzi
jmazzi / lastpass_to_keepassx.rb
Created June 13, 2010 19:57
Convert LastPass CSV to KeePassX XML
#!/usr/bin/ruby
#
# I recommend using Pocket to do the export. It works better than the browser extensions.
require 'rubygems'
require 'htmlentities'
require 'csv'
# CHANGE THIS
input_file = '/path/to/passwords.csv'